Examples of CacheConfigMetaData


Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

/*      */   private void addCacheAnnotations(EJBContainer container, JBossSessionBeanMetaData enterpriseBean)
/*      */     throws Exception
/*      */   {
/* 1487 */     if (enterpriseBean.getCacheConfig() != null)
/*      */     {
/* 1489 */       CacheConfigMetaData config = enterpriseBean.getCacheConfig();
/* 1490 */       if ((config.getValue() != null) && (!config.getValue().equals("")))
/*      */       {
/* 1492 */         String cacheValue = config.getValue();
/* 1493 */         CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
/* 1494 */         addClassAnnotation(container, Cache.class, cacheAnnotation);
/*      */
/* 1498 */         if (cacheValue.equals("SimpleStatefulCache"))
/*      */         {
/* 1500 */           if (!this.ejbClass.isAnnotationPresent(PersistenceManager.class))
/*      */           {
/* 1502 */             PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
/* 1503 */             if (config.getPersistenceManager() != null)
/*      */             {
/* 1505 */               persistenceAnnotation.setValue(config.getPersistenceManager());
/*      */             }
/* 1507 */             addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
/*      */           }
/*      */         }
/*      */       }
/*      */
/* 1512 */       if (config.getName() != null)
/*      */       {
/* 1514 */         CacheConfigImpl configAnnotation = new CacheConfigImpl();
/*      */
/* 1516 */         configAnnotation.setName(config.getName());
/*      */
/* 1518 */         if (config.getMaxSize() != null) {
/* 1519 */           configAnnotation.setMaxSize(config.getMaxSize().intValue());
/*      */         }
/* 1521 */         if (config.getIdleTimeoutSeconds() != null) {
/* 1522 */           configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds().intValue());
/*      */         }
/* 1524 */         if (config.getReplicationIsPassivation() != null) {
/* 1525 */           configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));
/*      */         }
/* 1527 */         if (config.getRemoveTimeoutSeconds() != null) {
/* 1528 */           configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds().intValue());
/*      */         }
/* 1530 */         CacheConfig existingConfig = (CacheConfig)this.ejbClass.getAnnotation(CacheConfig.class);
/* 1531 */         if (existingConfig != null) {
/* 1532 */           configAnnotation.merge(existingConfig);
/*      */         }
/* 1534 */         addClassAnnotation(container, CacheConfig.class, configAnnotation);
/*      */       }
/*      */       else
/*      */       {
/* 1538 */         CacheConfigImpl configAnnotation = new CacheConfigImpl();
/*      */
/* 1540 */         if (config.getMaxSize() != null) {
/* 1541 */           configAnnotation.setMaxSize(config.getMaxSize().intValue());
/*      */         }
/* 1543 */         if (config.getIdleTimeoutSeconds() != null) {
/* 1544 */           configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds().intValue());
/*      */         }
/* 1546 */         if (config.getRemoveTimeoutSeconds() != null) {
/* 1547 */           configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds().intValue());
/*      */         }
/* 1549 */         CacheConfig existingConfig = (CacheConfig)this.ejbClass.getAnnotation(CacheConfig.class);
/* 1550 */         if (existingConfig != null) {
/* 1551 */           configAnnotation.merge(existingConfig);
/*      */         }
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.CacheConfigMetaData

   private void addCacheAnnotations(EJBContainer container,
         JBossSessionBeanMetaData enterpriseBean) throws Exception
   {
      if (enterpriseBean.getCacheConfig() != null)
      {
         CacheConfigMetaData config = enterpriseBean.getCacheConfig();
         if (config.getValue() != null && !config.getValue().equals(""))
         {
            String cacheValue = config.getValue();
            CacheImpl cacheAnnotation = new CacheImpl(cacheValue);
            addClassAnnotation(container, Cache.class, cacheAnnotation);

            // FIXME: Wolf: what the hell is this?
            // FIXME: ALR: This shouldn't be hardcoded; configuration needs reworking
            if (cacheValue.equals("SimpleStatefulCache"))
            {
               if (!ejbClass.isAnnotationPresent(PersistenceManager.class))
               {
                  PersistenceManagerImpl persistenceAnnotation = new PersistenceManagerImpl();
                  if (config.getPersistenceManager() != null)
                  {
                     persistenceAnnotation.setValue(config.getPersistenceManager());
                  }
                  addClassAnnotation(container, PersistenceManager.class, persistenceAnnotation);
               }
            }
         }

         if (config.getName() != null)
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            configAnnotation.setName(config.getName());

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());

            if (config.getReplicationIsPassivation() != null)
               configAnnotation.setReplicationIsPassivation(Boolean.parseBoolean(config.getReplicationIsPassivation()));

            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());
           
            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
            addClassAnnotation(container, org.jboss.ejb3.annotation.CacheConfig.class, configAnnotation);
         }
         else
         {
            org.jboss.ejb3.annotation.impl.CacheConfigImpl configAnnotation = new org.jboss.ejb3.annotation.impl.CacheConfigImpl();

            if (config.getMaxSize() != null)
               configAnnotation.setMaxSize(config.getMaxSize());

            if (config.getIdleTimeoutSeconds() != null)
               configAnnotation.setIdleTimeoutSeconds(config.getIdleTimeoutSeconds());
           
            if (config.getRemoveTimeoutSeconds() != null)
               configAnnotation.setRemovalTimeoutSeconds(config.getRemoveTimeoutSeconds());

            org.jboss.ejb3.annotation.CacheConfig existingConfig = ejbClass.getAnnotation(org.jboss.ejb3.annotation.CacheConfig.class);
            if (existingConfig != null)
               configAnnotation.merge(existingConfig);
           
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.