Package org.jboss.jca.common.api.metadata.ds

Examples of org.jboss.jca.common.api.metadata.ds.DataSources


   @Override
   public DataSources parse(XMLStreamReader reader) throws Exception
   {

      DataSources dataSources = null;

      //iterate over tags
      int iterate;
      try
      {
View Full Code Here


   @Override
   public DataSources parse(XMLStreamReader reader) throws Exception
   {

      DataSources dataSources = null;

      //iterate over tags
      int iterate;
      try
      {
View Full Code Here

   @Override
   public DataSources parse(XMLStreamReader reader) throws Exception
   {

      DataSources dataSources = null;

      //iterate over tags
      int iterate;
      try
      {
View Full Code Here

                this.serviceContainer = serviceContainer;

                HashMap<String, org.jboss.jca.common.api.metadata.ds.Driver> drivers = new HashMap<String, org.jboss.jca.common.api.metadata.ds.Driver>(
                        1);

                DataSources dataSources = null;
                if (dataSourceConfig != null) {
                    String driverName = dataSourceConfig.getDriver();
                    InstalledDriver installedDriver = driverRegistry.getValue().getInstalledDriver(driverName);
                    if (installedDriver != null) {
                        String moduleName = installedDriver.getModuleName() != null ? installedDriver.getModuleName().getName()
View Full Code Here

            subsystem.get(OP).set(ADD);
            subsystem.get(OP_ADDR).set(address);

            list.add(subsystem);

            DataSources dataSources = null;
            try {
                String localName = null;
                switch (Namespace.forUri(reader.getNamespaceURI())) {
                    case DATASOURCES_1_0: {
                        localName = reader.getLocalName();
                        Element element = Element.forName(reader.getLocalName());
                        log.tracef("%s -> %s", localName, element);
                        switch (element) {
                            case SUBSYSTEM: {

                                final DsParser parser = new DsParser();
                                dataSources = parser.parse(reader);
                                requireNoContent(reader);
                                break;
                            }
                        }
                    }
                }
            } catch (Exception e) {
                throw new XMLStreamException(e);
            }

            if (dataSources != null) {
                for (DataSource dataSource : dataSources.getDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(DATA_SOURCE, dataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);

                    fillFrom(operation, dataSource);
                    list.add(operation);
                }

                for (XaDataSource xaDataSource : dataSources.getXaDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(XA_DATA_SOURCE, xaDataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);

                    fillFrom(operation, xaDataSource);
                    list.add(operation);
                }

                for (Driver driver : dataSources.getDrivers()) {
                    final ModelNode driverAddress = address.clone();
                    driverAddress.add(JDBC_DRIVER, driver.getName());
                    driverAddress.protect();
                    final ModelNode op = Util.getEmptyOperation(ADD, driverAddress);
View Full Code Here

                this.serviceContainer = serviceContainer;

                HashMap<String, org.jboss.jca.common.api.metadata.ds.Driver> drivers = new HashMap<String, org.jboss.jca.common.api.metadata.ds.Driver>(
                        1);

                DataSources dataSources = null;
                if (dataSourceConfig != null) {
                    String driverName = dataSourceConfig.getDriver();
                    InstalledDriver installedDriver = driverRegistry.getValue().getInstalledDriver(driverName);
                    if (installedDriver != null) {
                        String moduleName = installedDriver.getModuleName() != null ? installedDriver.getModuleName().getName()
View Full Code Here

        for (VirtualFile f : files) {
            InputStream xmlStream = null;
            try {
                xmlStream = new FileInputStream(f.getPhysicalFile());
                DsParser parser = new DsParser();
                DataSources dataSources = parser.parse(xmlStream);
                if (dataSources != null) {
                    deploymentUnit.addToAttachmentList(DATA_SOURCES_ATTACHMENT_KEY, dataSources);
                }
            } catch (Exception e) {
                throw new DeploymentUnitProcessingException(e.getMessage(), e);
View Full Code Here

            subsystem.get(OP).set(ADD);
            subsystem.get(OP_ADDR).set(address);

            list.add(subsystem);

            DataSources dataSources = null;
            try {
                String localName = null;
                switch (Namespace.forUri(reader.getNamespaceURI())) {
                    case DATASOURCES_1_0: {
                        localName = reader.getLocalName();
                        Element element = Element.forName(reader.getLocalName());
                        log.tracef("%s -> %s", localName, element);
                        switch (element) {
                            case SUBSYSTEM: {

                                final DsParser parser = new DsParser();
                                dataSources = parser.parse(reader);
                                requireNoContent(reader);
                                break;
                            }
                        }
                    }
                }
            } catch (Exception e) {
                throw new XMLStreamException(e);
            }

            if (dataSources != null) {
                for (DataSource dataSource : dataSources.getDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(DATA_SOURCE, dataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);

                    fillFrom(operation, dataSource);
                    list.add(operation);
                }

                for (XaDataSource xaDataSource : dataSources.getXaDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(XA_DATA_SOURCE, xaDataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);

                    fillFrom(operation, xaDataSource);
                    list.add(operation);
                }

                for (Driver driver : dataSources.getDrivers()) {
                    final ModelNode driverAddress = address.clone();
                    driverAddress.add(JDBC_DRIVER, driver.getName());
                    driverAddress.protect();
                    final ModelNode op = Util.getEmptyOperation(ADD, driverAddress);
View Full Code Here

   @Override
   public DataSources parse(XMLStreamReader reader) throws Exception
   {

      DataSources dataSources = null;

      //iterate over tags
      int iterate;
      try
      {
View Full Code Here

   @Override
   public DataSources parse(XMLStreamReader reader) throws Exception
   {

      DataSources dataSources = null;

      try
      {

         //iterate over tags
View Full Code Here

TOP

Related Classes of org.jboss.jca.common.api.metadata.ds.DataSources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.