Package org.jboss.ejb3.annotation.impl

Examples of org.jboss.ejb3.annotation.impl.CacheConfigImpl


   public <T> T getSecurityManager(Class<T> type)
   {
      try
      {
         InitialContext ctx = getInitialContext();
         SecurityDomain securityAnnotation = (SecurityDomain) resolveAnnotation(SecurityDomain.class);
         if (securityAnnotation != null && securityAnnotation.value().length() > 0)
         {
            return (T) SecurityDomainManager.getSecurityManager(securityAnnotation.value(),ctx);
         }
         return null;
      }
      catch (NamingException e)
      {
View Full Code Here


/*      */         }
/*      */       }
/*      */
/* 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);
/*      */         }
/* 1553 */         addClassAnnotation(container, CacheConfig.class, configAnnotation);
/*      */       }
/*      */     }
/*      */   }
View Full Code Here

      this.beanClass = classloader.loadClass(beanClassName);

      // We can't type cast the direct container, because we just loaded the beanClass
      // so assuming we have an object is a safe bet.
      this.beanContainer = new BeanContainer(this);

      this.ejbName = ejbName;

      String on = createObjectName(ejbName);
      try
View Full Code Here

      {
         return;
      }
     
      Cache cacheConfig = getAnnotation(Cache.class);
      CacheFactoryRegistry registry = getCacheFactoryRegistry();
      Ejb3CacheFactory factory = registry.getCacheFactory(cacheConfig.value());
      this.cache = factory.createCache();
      this.cache.initialize(this);
      this.cache.start();
   }
View Full Code Here

         return;
      }
     
      Cache cacheConfig = getAnnotation(Cache.class);
      CacheFactoryRegistry registry = getCacheFactoryRegistry();
      Ejb3CacheFactory factory = registry.getCacheFactory(cacheConfig.value());
      this.cache = factory.createCache();
      this.cache.initialize(this);
      this.cache.start();
   }
View Full Code Here

      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
      pushEnc();
      try
      {
         Thread.currentThread().setContextClassLoader(classloader);
         StatefulCache cache = this.getCache();
         StatefulBeanContext ctx = cache.create(initTypes, initValues);
         // Since we return the key here, the context is not in use.
         cache.release(ctx);
         Object id = ctx.getId();
         assert id instanceof Serializable : "SFSB Session IDs must be " + Serializable.class.getSimpleName();
         return (Serializable) id;
      }
      finally
View Full Code Here

      // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String name = new Date().toString();
      String applicationClientName = "ee5client_test";
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);
     
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
         Method getResult = clientClass.getDeclaredMethod("getResult", empty);
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };

      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };
     
      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

      // JNDI name in jboss-client.xml or display-name in application-client.xml, or client jar simple name
      String applicationClientName = "refs-client";
      String name = new Date().toString();
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);

      // Need to use the client class obtained from the launcher
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.annotation.impl.CacheConfigImpl

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.