Package org.jboss.ejb3.embedded.resource

Examples of org.jboss.ejb3.embedded.resource.RARDeployment


      }
   }

   public String resolveEJB(String link, Class<?> beanInterface, String mappedName)
   {
      EjbReference reference = new EjbReference(link, beanInterface.getName(), mappedName);
      return this.ejbReferenceResolver.resolveEjb(deploymentUnit, reference);
   }
View Full Code Here


      // Create the EJB Container
      final Map<String, String> ejbContainerProps = new HashMap<String, String>();
      ejbContainerProps.put(EJBContainer.MODULES, ""); // Deploy no modules and do no scanning by default
      final JBossEJBContainerProvider ejbContainer = (JBossEJBContainerProvider) EJBContainer
            .createEJBContainer(ejbContainerProps);
      final ShrinkWrapEJBContainer shrinkwrapEjbContainer = new ShrinkWrapEJBContainerImpl(ejbContainer);

      // Define the EJB JAR
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "outputSlsb.jar").addClasses(OutputBean.class,
            OutputLocalBusiness.class);

      // Deploy the JAR
      shrinkwrapEjbContainer.deploy(archive);

      // Look up the EJB
      final Context context = ejbContainer.getContext();
      final OutputLocalBusiness bean;
      try
      {
         bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
      }
      catch (final NamingException e)
      {
         throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
      }

      // Invoke
      final String value = bean.getOutput();

      // Undeploy
      shrinkwrapEjbContainer.undeploy(archive);

      // Shut down EJBContainer
      ejbContainer.close();

      // Write out
View Full Code Here

      // Create the EJB Container
      final Map<String, String> ejbContainerProps = new HashMap<String, String>();
      ejbContainerProps.put(EJBContainer.MODULES, ""); // Deploy no modules and do no scanning by default
      final JBossEJBContainerProvider ejbContainer = (JBossEJBContainerProvider) EJBContainer
            .createEJBContainer(ejbContainerProps);
      final ShrinkWrapEJBContainer shrinkwrapEjbContainer = new ShrinkWrapEJBContainerImpl(ejbContainer);

      // Define the EJB JAR
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "outputSlsb.jar").addClasses(OutputBean.class,
            OutputLocalBusiness.class);

      // Deploy the JAR
      shrinkwrapEjbContainer.deploy(archive);

      // Look up the EJB
      final Context context = ejbContainer.getContext();
      final OutputLocalBusiness bean;
      try
      {
         bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
      }
      catch (final NamingException e)
      {
         throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
      }

      // Invoke
      final String value = bean.getOutput();

      // Undeploy
      shrinkwrapEjbContainer.undeploy(archive);

      // Shut down EJBContainer
      ejbContainer.close();

      // Write out
View Full Code Here

      if (entry != null)
      {
         Object target = entry.getTarget();
         if (target instanceof RARDeployment)
         {
            RARDeployment deployment = (RARDeployment)target;
            return deployment.invoke(operationName, params, signature);
         }
         else
         {
            Class[] types = new Class[signature.length];
            for (int i = 0; i < signature.length; ++i)
View Full Code Here

      if (entry != null)
      {
         Object target = entry.getTarget();
         if (target instanceof RARDeployment)
         {
            RARDeployment deployment = (RARDeployment) target;
            return deployment.invoke(operationName, params, signature);
         }
         else
         {
            Class[] types = new Class[signature.length];
            for (int i = 0; i < signature.length; ++i)
View Full Code Here

/* 237 */     if (entry != null)
/*     */     {
/* 239 */       Object target = entry.getTarget();
/* 240 */       if ((target instanceof RARDeployment))
/*     */       {
/* 242 */         RARDeployment deployment = (RARDeployment)target;
/* 243 */         return deployment.invoke(operationName, params, signature);
/*     */       }
/*     */
/* 247 */       Class[] types = new Class[signature.length];
/* 248 */       for (int i = 0; i < signature.length; i++)
/*     */       {
View Full Code Here

/* 51 */     if (entry != null)
/*    */     {
/* 53 */       Object target = entry.getTarget();
/* 54 */       if ((target instanceof RARDeployment))
/*    */       {
/* 56 */         RARDeployment deployment = (RARDeployment)target;
/* 57 */         return deployment.invoke(operationName, params, signature);
/*    */       }
/*    */
/* 61 */       Class[] types = new Class[signature.length];
/* 62 */       for (int i = 0; i < signature.length; i++)
/*    */       {
View Full Code Here

      response.setContentType(CONTENT_TYPE_TEXT_PLAIN);

      // Create the EJB Container
      final Map<String, String> ejbContainerProps = new HashMap<String, String>();
      ejbContainerProps.put(EJBContainer.MODULES, ""); // Deploy no modules and do no scanning by default
      final JBossEJBContainerProvider ejbContainer = (JBossEJBContainerProvider) EJBContainer
            .createEJBContainer(ejbContainerProps);
      final ShrinkWrapEJBContainer shrinkwrapEjbContainer = new ShrinkWrapEJBContainerImpl(ejbContainer);

      // Define the EJB JAR
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "outputSlsb.jar").addClasses(OutputBean.class,
            OutputLocalBusiness.class);

      // Deploy the JAR
      shrinkwrapEjbContainer.deploy(archive);

      // Look up the EJB
      final Context context = ejbContainer.getContext();
      final OutputLocalBusiness bean;
      try
      {
         bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
      }
      catch (final NamingException e)
      {
         throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
      }

      // Invoke
      final String value = bean.getOutput();

      // Undeploy
      shrinkwrapEjbContainer.undeploy(archive);

      // Shut down EJBContainer
      ejbContainer.close();

      // Write out
      log.info("Got value from EJB: " + value);
      response.getWriter().write(value);
   }
View Full Code Here

         boolean isEar = unit != unit.getTopLevel();
         this.deploymentScope = new JBoss5DeploymentScope(unit.getParent(), isEar);
      }

      ejbResolver = new ClientEjbResolver(deploymentScope, unit.getSimpleName());
      messageDestinationResolver = new MessageDestinationResolver(deploymentScope, xml.getMessageDestinations());

      String on = Ejb3Module.BASE_EJB3_JMX_NAME + createScopeKernelName(unit, deploymentScope) + ",name=" + applicationClientName;
      try
      {
         this.objectName = new ObjectName(on);
View Full Code Here

      @Deprecated
      Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();

      // Get the resolver
      EndpointResolver resolver = registrar.lookup(MC_BIND_NAME_ENDPOINT_RESOLVER, EndpointResolver.class);
      this.ejbClassName = descriptor.getBeanClass().getSimpleName();
      endpointMcBindName = resolver.resolve(deploymentUnit, ejbClassName);
      this.stateful = descriptor.isStateful();
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.embedded.resource.RARDeployment

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.