Package org.jboss.ejb3.core.proxy.spi

Examples of org.jboss.ejb3.core.proxy.spi.RemoteProxyFactory.create()


      container.processMetadata();
      System.out.println("injectors = " + container.getInjectors());
      Ejb3Registry.register(container);
      try
      {
         container.create();
         container.setJaccContextId("none");
         container.start();
        
         Object id = container.createSession();
        
View Full Code Here


      container.processMetadata();
      System.out.println("injectors = " + container.getInjectors());
      Ejb3Registry.register(container);
      try
      {
         container.create();
         container.setJaccContextId("none");
         container.start();
        
         Object id = container.createSession();
        
View Full Code Here

   public void testGetEJBHome() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      Object o = session.getEJBHome();
      HomedStatelessHome home2 = (HomedStatelessHome) PortableRemoteObject.narrow(o, HomedStatelessHome.class);
      // TODO: check home2
   }
  
View Full Code Here

   public void testGetHandle() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      Handle h = session.getHandle();
      MarshalledObject mo = new MarshalledObject(h);
      Handle h2 = (Handle) mo.get();
      Object o = h2.getEJBObject();
      MySession session2 = (MySession) PortableRemoteObject.narrow(o, MySession.class);
View Full Code Here

   public void testHomedStateless() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      String me = new Date().toString();
      String response = session.sayHelloTo(me);
      assertEquals("Hi " + me, response);
   }
  
View Full Code Here

   public void testIsIdentical() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MyStatefulBean/home");
      MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
      MyStateful session = home.create();
      Handle h = session.getHandle();
      MarshalledObject mo = new MarshalledObject(h);
      Handle h2 = (Handle) mo.get();
      Object o = h2.getEJBObject();
      MyStateful session2 = (MyStateful) PortableRemoteObject.narrow(o, MyStateful.class);
View Full Code Here

   public void testRemoveByHandle() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MyStatefulBean/home");
      MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
      MyStateful session = home.create();
      session.setName("Me");
      home.remove(session.getHandle());
      try
      {
         session.sayHello();
View Full Code Here

   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MyStatefulBean/home");
      MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
      //MyStateful bean1 = (MyStateful) PortableRemoteObject.narrow(obj, MyStateful.class);
      MyStateful bean1 = home.create();
      bean1.setName("bean1");
      String response = bean1.sayHello();
      assertEquals("Hello bean1", response);
      bean1.remove();
   }
View Full Code Here

   public void testGetPrimaryKeyAndRemove() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MyStatefulBean/home");
      MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
      MyStateful session = home.create();
      Object primaryKey = session.getPrimaryKey();
      assertNotNull(primaryKey);
     
      home.remove(primaryKey);
      try
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.