Examples of JDBCEntityMetaData


Examples of org.jboss.as.cmp.jdbc.metadata.JDBCEntityMetaData

                component.getConfigurators().add(new ComponentConfigurator() {
                    public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
                        final CmpEntityBeanComponentDescription componentDescription = (CmpEntityBeanComponentDescription) description;

                        final JDBCEntityMetaData entityMetaData = componentDescription.getEntityMetaData();

                        final JDBCStoreManager storeManager = new JDBCStoreManager(context.getDeploymentUnit(), entityMetaData, new CmpConfig(), catalog);

                        // Phase 1: Init the store
                        final JdbcStoreManagerInitService initService = new JdbcStoreManagerInitService(storeManager);
                        final ServiceBuilder<?> initBuilder = context.getServiceTarget().addService(initName, initService);
                        initBuilder.addDependency(KeyGeneratorFactoryRegistry.SERVICE_NAME, KeyGeneratorFactoryRegistry.class, storeManager.getKeyGeneratorFactoryInjector());
                        addDataSourceDependency(initBuilder, storeManager, entityMetaData.getDataSourceName());
                        for (JDBCRelationshipRoleMetaData roleMetaData : entityMetaData.getRelationshipRoles()) {
                            final String dsName = roleMetaData.getRelationMetaData().getDataSourceName();
                            if (dsName != null) {
                                addDataSourceDependency(initBuilder, storeManager, dsName);
                            }
                        }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCEntityMetaData

                component.getConfigurators().add(new ComponentConfigurator() {
                    public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
                        final CmpEntityBeanComponentDescription componentDescription = (CmpEntityBeanComponentDescription) description;

                        final JDBCEntityMetaData entityMetaData = componentDescription.getEntityMetaData();

                        final JDBCStoreManager storeManager = new JDBCStoreManager(context.getDeploymentUnit(), entityMetaData, new CmpConfig(), catalog);

                        // Phase 1: Init the store
                        final JdbcStoreManagerInitService initService = new JdbcStoreManagerInitService(storeManager);
                        final ServiceBuilder<?> initBuilder = context.getServiceTarget().addService(initName, initService);
                        addDataSourceDependency(initBuilder, storeManager, entityMetaData.getDataSourceName());
                        for (JDBCRelationshipRoleMetaData roleMetaData : entityMetaData.getRelationshipRoles()) {
                            final String dsName = roleMetaData.getRelationMetaData().getDataSourceName();
                            if (dsName != null) {
                                addDataSourceDependency(initBuilder, storeManager, dsName);
                            }
                        }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCEntityMetaData

        final JDBCApplicationMetaData applicationMetaData = deploymentUnit.getAttachment(Attachments.JDBC_APPLICATION_KEY);
        if(applicationMetaData == null) {
            return;
        }

        final JDBCEntityMetaData entityMetaData = applicationMetaData.getBeanByEjbName(description.getEJBName());
        if(entityMetaData == null) {
            throw new DeploymentUnitProcessingException("No entity metadata for EntityBean: " + description.getEJBName());
        }
        description.setEntityMetaData(entityMetaData);
    }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCEntityMetaData

                component.getConfigurators().add(new ComponentConfigurator() {
                    public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
                        final CmpEntityBeanComponentDescription componentDescription = (CmpEntityBeanComponentDescription) description;

                        final JDBCEntityMetaData entityMetaData = componentDescription.getEntityMetaData();

                        final JDBCStoreManager storeManager = new JDBCStoreManager(context.getDeploymentUnit(), entityMetaData, catalog);

                        // Phase 1: Init the store
                        final JdbcStoreManagerInitService initService = new JdbcStoreManagerInitService(storeManager);
                        final ServiceBuilder<?> initBuilder = context.getServiceTarget().addService(initName, initService);
                        initBuilder.addDependency(KeyGeneratorFactoryRegistry.SERVICE_NAME, KeyGeneratorFactoryRegistry.class, storeManager.getKeyGeneratorFactoryInjector());
                        addDataSourceDependency(initBuilder, storeManager, entityMetaData.getDataSourceName());
                        for (JDBCRelationshipRoleMetaData roleMetaData : entityMetaData.getRelationshipRoles()) {
                            final String dsName = roleMetaData.getRelationMetaData().getDataSourceName();
                            if (dsName != null) {
                                addDataSourceDependency(initBuilder, storeManager, dsName);
                            }
                        }
View Full Code Here

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCEntityMetaData

        final JDBCApplicationMetaData applicationMetaData = deploymentUnit.getAttachment(Attachments.JDBC_APPLICATION_KEY);
        if(applicationMetaData == null) {
            return;
        }

        final JDBCEntityMetaData entityMetaData = applicationMetaData.getBeanByEjbName(description.getEJBName());
        if(entityMetaData == null) {
            throw CmpMessages.MESSAGES.noEntityMetaDataForEntity(description.getEJBName());
        }
        description.setEntityMetaData(entityMetaData);
    }
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData

         amd.addPluginData(CMP_JDBC, jamd);
      }

      // Get JDBC Bean MetaData
      String ejbName = container.getBeanMetaData().getEjbName();
      JDBCEntityMetaData metadata = jamd.getBeanByEjbName(ejbName);
      if(metadata == null)
      {
         throw new DeploymentException("No metadata found for bean " + ejbName);
      }
      return metadata;
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData

         amd.addPluginData(CMP_JDBC, jamd);
      }

      // Get JDBC Bean MetaData
      String ejbName = container.getBeanMetaData().getEjbName();
      JDBCEntityMetaData metadata = jamd.getBeanByEjbName(ejbName);
      if(metadata == null)
      {
         throw new DeploymentException("No metadata found for bean " + ejbName);
      }
      return metadata;
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData

         amd.addPluginData(CMP_JDBC, jamd);
      }

      // Get JDBC Bean MetaData
      String ejbName = container.getBeanMetaData().getEjbName();
      JDBCEntityMetaData metadata = jamd.getBeanByEjbName(ejbName);
      if(metadata == null)
      {
         throw new DeploymentException("No metadata found for bean " + ejbName);
      }
      return metadata;
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData

/* 732 */       jamd = jfl.load();
/* 733 */       amd.addPluginData("CMP-JDBC", jamd);
/*     */     }
/*     */
/* 737 */     String ejbName = this.container.getBeanMetaData().getEjbName();
/* 738 */     JDBCEntityMetaData metadata = jamd.getBeanByEjbName(ejbName);
/* 739 */     if (metadata == null)
/*     */     {
/* 741 */       throw new DeploymentException("No metadata found for bean " + ejbName);
/*     */     }
/* 743 */     return metadata;
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData

/* 509 */       jamd = jfl.load();
/* 510 */       amd.addPluginData("CMP-JDBC", jamd);
/*     */     }
/*     */
/* 514 */     String ejbName = this.container.getBeanMetaData().getEjbName();
/* 515 */     JDBCEntityMetaData metadata = jamd.getBeanByEjbName(ejbName);
/* 516 */     if (metadata == null)
/*     */     {
/* 518 */       throw new DeploymentException("No metadata found for bean " + ejbName);
/*     */     }
/* 520 */     return metadata;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.