Package org.jboss.aop

Examples of org.jboss.aop.Domain$DomainClassifiedBindingAndPointcutCollection


/* 82 */     return manager;
/*    */   }
/*    */
/*    */   private static AspectManager createNewDomain(AspectManager parent, String name)
/*    */   {
/* 87 */     Domain domain = new Domain(parent, name, true);
/* 88 */     domain.setInheritsBindings(true);
/* 89 */     domain.setInheritsDeclarations(true);
/* 90 */     return domain;
/*    */   }
View Full Code Here


/*     */
/*     */   private AspectManager getCorrectManager(VFSDeploymentUnit unit)
/*     */   {
/* 361 */     AOPClassLoaderScopingPolicy policy = AspectManager.getClassLoaderScopingPolicy();
/*     */
/* 363 */     Domain domain = null;
/* 364 */     if (policy != null)
/*     */     {
/* 366 */       if (!(policy instanceof DomainInitializer))
/*     */       {
/* 368 */         throw new RuntimeException(policy + " must implement DomainInitializer");
View Full Code Here

/*  54 */     DomainInitializerCallback callback = new DomainInitializerCallback(ClassLoader.class);
/*  55 */     DomainInitializerCallback[] callbacks = { callback };
/*  56 */     handler.handle(callbacks);
/*     */
/*  58 */     ClassLoader loader = (ClassLoader)callback.getValue();
/*  59 */     Domain domain = getDomain(loader, AspectManager.getTopLevelAspectManager());
/*     */
/*  61 */     AspectManager.instance().registerClassLoader(loader);
/*     */
/*  63 */     return domain;
/*     */   }
View Full Code Here

/*     */   public synchronized Domain getDomain(ClassLoader classLoader, AspectManager parent)
/*     */   {
/*  68 */     ClassLoader scopedClassLoader = ifScopedDeploymentGetScopedParentUclForCL(classLoader);
/*  69 */     if (scopedClassLoader != null)
/*     */     {
/*  71 */       Domain scopedManager = null;
/*  72 */       synchronized (AOPClassPoolRepository.getInstance().getRegisteredCLs())
/*     */       {
/*  74 */         Object loaderRepository = getLoaderRepository(classLoader);
/*  75 */         scopedManager = (Domain)this.scopedClassLoaderDomains.get(loaderRepository);
/*     */
/*  78 */         if ((scopedManager != null) && (!scopedManager.isValid()))
/*     */         {
/*  80 */           this.scopedClassLoaderDomains.remove(loaderRepository);
/*  81 */           scopedManager = null;
/*     */         }
/*     */
/*  84 */         if (scopedManager == null)
/*     */         {
/*  86 */           scopedManager = getScopedClassLoaderDomain(scopedClassLoader, parent);
/*  87 */           this.log.debug("Created domain " + scopedManager + " for scoped deployment on: " + classLoader + "; identifying scoped ucl: " + scopedClassLoader);
/*     */
/*  89 */           scopedManager.setInheritsBindings(true);
/*  90 */           scopedManager.setInheritsDeclarations(true);
/*     */
/*  92 */           this.scopedClassLoaderDomains.put(loaderRepository, scopedManager);
/*     */         }
/*  94 */         return scopedManager;
/*     */       }
View Full Code Here

     
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class<?> beanClass = MockBean.class;
      String beanClassName = beanClass.getName();
      String ejbName = beanClass.getSimpleName();
      Domain domain = new Domain(new AspectManager(), "Test", false);
      Map<String, Class<? extends PersistenceManagerFactory>> factories = new HashMap<String, Class<? extends PersistenceManagerFactory>>();
      factories.put("MyStatefulSessionFilePersistenceManager", MyStatefulSessionFilePersistenceManagerFactory.class);
      PersistenceManagerFactoryRegistry persistenceManagerFactoryRegistry = new PersistenceManagerFactoryRegistry();
      persistenceManagerFactoryRegistry.setFactories(factories);
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
View Full Code Here

   public synchronized Domain getDomain(ClassLoader classLoader, AspectManager parent)
   {
      ClassLoader scopedClassLoader = ifScopedDeploymentGetScopedParentUclForCL(classLoader);
      if (scopedClassLoader != null)
      {
         Domain scopedManager = null;
         synchronized (ClassPoolRepository.getInstance().getRegisteredCLs())
         {
            Object loaderRepository = getLoaderRepository(classLoader);
            scopedManager = scopedClassLoaderDomains.get(loaderRepository);
           
            // FIXME: JBAOP-107 REMOVE THIS HACK
            if (scopedManager != null && scopedManager.isValid() == false)
            {
               scopedClassLoaderDomains.remove(loaderRepository);
               scopedManager = null;
            }
           
            if (scopedManager == null)
            {
               scopedManager = getScopedClassLoaderDomain(scopedClassLoader, parent);
               log.debug("Created domain " + scopedManager + " for scoped deployment on: " +
                        classLoader + "; identifying scoped ucl: " + scopedClassLoader);
               scopedManager.setInheritsBindings(true);
               scopedManager.setInheritsDeclarations(true);
              
               scopedClassLoaderDomains.put(loaderRepository, scopedManager);
            }
            return scopedManager;
         }
View Full Code Here

         // Ensure jndi.properties is accessible
         log.info("Found: " + cl.getResource("jndi.properties"));

         // Obtain properties required of container construction
         String beanClassname = smd.getEjbClass();
         Domain domain = getDomain(sessionType.equals(ContainerType.SLSB)
               ? AbstractEJB3TestCase.DOMAIN_NAME_SLSB
               : AbstractEJB3TestCase.DOMAIN_NAME_SFSB);
         Hashtable<?, ?> ctxProperties = null;
        
         // Is SFSB, manually set a PM Factory Registry and Cache Factory
View Full Code Here

   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      System.out.println(cl.getResource("jndi.properties"));
      String beanClassname = MyStatefulBean.class.getName();
      String ejbName = MyStatefulBean.class.getSimpleName();
      Domain domain = getDomain("Stateful Bean");
      Hashtable<?,?> ctxProperties = null;
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      deployment.setPersistenceManagerFactoryRegistry(getBootstrap().lookup("EJB3PersistenceManagerFactoryRegistry", PersistenceManagerFactoryRegistry.class));
      JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(MyStatefulBean.class);
      StatefulContainer container = new StatefulContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
View Full Code Here

   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class<?> beanClass = AnnotatedWebServiceContextInjectedBean.class;
      String beanClassname = beanClass.getName();
      String ejbName = beanClass.getSimpleName();
      Domain domain = getDomain("Stateless Bean");
      Hashtable<?,?> ctxProperties = null;
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(beanClass);
      StatelessContainer container = new StatelessContainer(cl, beanClassname, ejbName, domain, ctxProperties, deployment, beanMetaData);
     
View Full Code Here

   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      Class<?> beanClass = OverrideWebServiceContextInjectedBean.class;
      String beanClassname = beanClass.getName();
      String ejbName = beanClass.getSimpleName();
      Domain domain = getDomain("Stateless Bean");
      Hashtable<?,?> ctxProperties = null;
      Ejb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
      JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(beanClass);
     
      // add an override
View Full Code Here

TOP

Related Classes of org.jboss.aop.Domain$DomainClassifiedBindingAndPointcutCollection

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.