Package org.jboss.ejb3.packagemanager

Examples of org.jboss.ejb3.packagemanager.PackageManagerEnvironment


      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
            BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());
View Full Code Here


      if(service instanceof EJBContainer)
      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
View Full Code Here

*/
public class ClientJavaEEComponent extends AbstractJavaEEComponent
{
   public ClientJavaEEComponent(String clientName)
   {
      super(new SimpleJavaEEModule(clientName));
   }
View Full Code Here

   private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;

   public ClientENCInjectionContainer(VFSDeploymentUnit unit, JBossClientMetaData xml, Class<?> mainClass, String applicationClientName, ClassLoader classLoader,
         Context encCtx, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver) throws NamingException
   {
      super(new SimpleJavaEEModule((unit.getParent() != null ? unit.getParent().getSimpleName() : null), unit.getSimpleName()));
      if (mainClass == null)
         throw new NullPointerException("mainClass is mandatory");
      if (applicationClientName == null)
         throw new NullPointerException("applicationClientName is mandatory");
      if (classLoader == null)
View Full Code Here

   }

   public TomcatInjectionContainer(WebApplication appInfo, DeploymentUnit unit, org.apache.catalina.Context catalinaContext,
         PersistenceUnitDependencyResolver resolver, Set<String> dynamicClassLoaders, JavaEEComponent component, InjectionManager injectionManager)
   {
      super(new SimpleJavaEEModule(appInfo.getName()));

      assert component != null : "component is null";

      this.unit = unit;
      this.appInfo = appInfo;
View Full Code Here

      if(result instanceof JBossGenericBeanMetaData)
      {
         log.warn("FIXME: EJBTHREE-1227: JBossGenericBeanMetaData found for '" + ejbName + "' instead of " + enterpriseBeanMetaDataClass);
         if(enterpriseBeanMetaDataClass.equals(JBossSessionBeanMetaData.class))
         {
            result = new JBossSessionGenericWrapper((JBossGenericBeanMetaData) result);
         }
         else if(enterpriseBeanMetaDataClass.equals(JBossMessageDrivenBeanMetaData.class))
         {
            result = new JBossMessageDrivenBeanGenericWrapper((JBossGenericBeanMetaData) result);
         }
View Full Code Here

    * </p>
    *
    */
   protected void initMetaDataBasedAnnotationRepository()
   {
      this.metadataBasedAnnotationRepo = new AnnotationRepositoryToMetaData(this.beanClass, this.xml, name, this.classloader);
      List<MetaDataBridge<InterceptorMetaData>> interceptorBridges = new ArrayList<MetaDataBridge<InterceptorMetaData>>();
      interceptorBridges.add(new InterceptorMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
View Full Code Here

    * @param pkgMgrCtx
    */
   public DefaultDatabaseManager(PackageManagerContext pkgMgrCtx)
   {
      this.packageManagerCtx = pkgMgrCtx;
      PackageManagerEnvironment environment = pkgMgrCtx.getPackageManagerEnvironment();
      // we use derby (filesystem) based DB
      File dbHome = environment.getDataDir();
      // set the Derby system home property to point to the package manager db
      System.setProperty("derby.system.home", dbHome.getAbsolutePath());

      logger.info("Package manager DB home set to " + System.getProperty("derby.system.home"));
      this.entityMgrFactory = Persistence.createEntityManagerFactory("default");
View Full Code Here

      if (!pmHome.exists())
      {
         throw new PackageManagerException("Package manager home " + pmHome + " does not exist!");
      }
      logger.info("Using Package Manager Home: " + packageManagerHome);
      PackageManagerEnvironment env = new PackageManagerEnvironment(packageManagerHome);
     
      // Run the setup script
      String schemaSetupScript = (String) cmdLineParser.getOptionValue(schemaFileCmdOption);
      if (schemaSetupScript != null)
      {
         File schemaFile = new File(schemaSetupScript);
         if (!schemaFile.exists())
         {
            throw new PackageManagerException(
                  "Could not setup the database for package manager, because of non-existent schema file "
                        + schemaSetupScript);
         }
         Connection conn = null;
         // We use Derby Embedded which is file based (so point to the DB home).
         // TODO: This should ideally be handled by the PackageDatabaseManager,
         // or some central place which is aware of the DB type. Let's just
         // do this here for now.
         File dbHome = env.getDataDir();
         // set the Derby system home property to point to the package manager db
         System.setProperty("derby.system.home", dbHome.getAbsolutePath());
         logger.info("Package manager DB home set to " + System.getProperty("derby.system.home"));

         try
View Full Code Here

      if (!pmHome.exists())
      {
         throw new PackageManagerException("Package manager home " + pmHome + " does not exist!");
      }
      logger.info("Using Package Manager Home: " + packageManagerHome);
      PackageManagerEnvironment env = new PackageManagerEnvironment(packageManagerHome);
      // Check for JBOSS_HOME
      String jbossHome = (String) cmdLineParser.getOptionValue(jbossHomeCmdOption);
      if (packageManagerHome == null)
      {
         throw new PackageManagerException("Package manager home has not been set");
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.packagemanager.PackageManagerEnvironment

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.