5 Replies Latest reply on May 5, 2006 6:01 AM by atteeeeeee

    EJB3 & IIOP

    atteeeeeee

      Hello,
      I cannot find any information about ejb3 & iiop together (maybe my mistake) Could anybody tell, how can I tell jboss server to bind my ejb3 object into the JacORB-s nameservice, and let the object invoked through iiop?
      With ejb 2.1 a had success, but now I cannot use the jboss.xml neither.
      Is there any annotation to configure the invoker? Or how should I modify the jboss.xml for example for the CalculatorBean in the tutorial:
      package org.jboss.tutorial.stateless.bean;

      import javax.ejb.Stateless;

      @Stateless
      public class CalculatorBean implements CalculatorRemote, CalculatorLocal
      {
      public int add(int x, int y)
      {
      return x + y;
      }

      public int subtract(int x, int y)
      {
      return x - y;
      }
      }
      I found fhis, but how to modify to get work:
      http://www.jboss.com/developers/projects/jboss/IIOP
      (It workd fine for ejb2.1) Thanks, Attila

        • 1. Re: EJB3 & IIOP
          atteeeeeee

          Well, actually I have a problem with the jboss.xml even if it has common tags.

          <jboss>
           <enterprise-beans>
           <session>
           <ejb-name>TestBean</ejb-name>
           <jndi-name>TestBean</jndi-name>
           </session>
           </enterprise-beans>
           </jboss>
          

          I got this Exception
          2006-05-03 19:10:51,088 DEBUG [org.jboss.ejb3.Ejb3DescriptorHandler] found jboss.xml jar:file:/usr/local/jboss-4.0.3SP1/server/all/tmp/deploy/t
          mp52110ejb3-test.jar!/META-INF/jboss.xml
          2006-05-03 19:10:51,088 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=ejb3-test.jar
          java.lang.NoSuchMethodError: org.jboss.xb.binding.UnmarshallerFactory.setFeature(Ljava/lang/String;Ljava/lang/Object;)V
           at org.jboss.ejb3.Ejb3DescriptorHandler.parseDescriptors(Ejb3DescriptorHandler.java:570)
           at org.jboss.ejb3.Ejb3HandlerFactory$DDFactory.<init>(Ejb3HandlerFactory.java:42)
           at org.jboss.ejb3.Ejb3HandlerFactory.getInstance(Ejb3HandlerFactory.java:79)
           at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:505)
           at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:461)
           at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
          


          --- MBeans waiting for other MBeans ---
          ObjectName: jboss.j2ee:service=EJB3,module=ejb3-test.jar
           State: FAILED
           Reason: java.lang.NoSuchMethodError: org.jboss.xb.binding.UnmarshallerFactory.setFeature(Ljava/lang/String;Ljava/lang/Object;)V
          
          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
          ObjectName: jboss.j2ee:service=EJB3,module=ejb3-test.jar
           State: FAILED
           Reason: java.lang.NoSuchMethodError: org.jboss.xb.binding.UnmarshallerFactory.setFeature(Ljava/lang/String;Ljava/lang/Object;)V
          
          


          I have jboss 4.0.3SP + ejb3

          • 2. Re: EJB3 & IIOP
            atteeeeeee

            I have to realize that I have problem with the App Server itself, as it does not like the jboss.xml, even with simple tags. My app server seems to be corrupted maybe because of the new EJB3 install which I did after the docs found in the fhe full jboss ejb3 ducumentation.
            I tried to install the newest JBoss AS, but seems to have some problem with it too. The EJB3 beans cannot be found in jndi after deployment.
            Is there any documentation about the installation of the new 4.0.4 CR2?
            Does anybody have similar problems?
            This corruption should be signed on the 4.0.3 +EJB3RC instuctional page maybe.
            Any help would be fine, thanks, A.

            • 3. Re: EJB3 & IIOP
              alesj

              Install JBossAS 4.0.4.CR2 thorugh Installer - with EJB3 module included.

              • 4. Re: EJB3 & IIOP
                atteeeeeee

                Ok, I did it. First I tried to add the jacorb and iiop services to that configuration, but something was wrong, and the iiop-invoker could not start. Than I did it reverse, I added the ejb3-extras to the all configuration from the zip package. It seems to work, the invoker seems to work, is is showed as started in jmx, but when the jboss.xml is modified to make the ejb to use the iiop invoker, it does not register it into the CORBA NameService.
                Here is my jmx jndi view:

                HASessionState (class: org.jnp.interfaces.NamingContext)
                 | +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
                 +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
                 +- jmx (class: org.jnp.interfaces.NamingContext)
                 | +- invoker (class: org.jnp.interfaces.NamingContext)
                 | | +- RMIAdaptor (proxy: $Proxy52 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
                 | +- rmi (class: org.jnp.interfaces.NamingContext)
                 | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
                 +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
                 +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
                 +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
                 +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
                 +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
                 +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
                 +- invokers (class: org.jnp.interfaces.NamingContext)
                 | +- localhost(class: org.jnp.interfaces.NamingContext)
                 | | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
                 +- TestBean (class: org.jnp.interfaces.NamingContext)
                 | +- remote (class: java.lang.Object)
                 | +- remoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
                 +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
                 +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
                 +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
                 +- HAPartition (class: org.jnp.interfaces.NamingContext)
                 | +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
                 +- topic (class: org.jnp.interfaces.NamingContext)
                 | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
                 | +- testTopic (class: org.jboss.mq.SpyTopic)
                 | +- securedTopic (class: org.jboss.mq.SpyTopic)
                 +- queue (class: org.jnp.interfaces.NamingContext)
                 | +- A (class: org.jboss.mq.SpyQueue)
                 | +- testQueue (class: org.jboss.mq.SpyQueue)
                 | +- ex (class: org.jboss.mq.SpyQueue)
                 | +- DLQ (class: org.jboss.mq.SpyQueue)
                 | +- D (class: org.jboss.mq.SpyQueue)
                 | +- C (class: org.jboss.mq.SpyQueue)
                 | +- B (class: org.jboss.mq.SpyQueue)
                 +- console (class: org.jnp.interfaces.NamingContext)
                 | +- PluginManager (proxy: $Proxy53 implements interface org.jboss.console.manager.PluginManagerMBean)
                 +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
                 +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
                 +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
                 +- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate)
                 +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
                 +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
                

                My CorbaNaming service says just these:
                TransactionService
                UserTransaction

                Here is my jboss.xml
                <jboss>
                 <enterprise-beans>
                 <session>
                 <ejb-name>TestBean</ejb-name>
                 <configuration-name>Standard Stateful SessionBean</configuration-name>
                 <invoker-bindings>
                 <invoker>
                 <invoker-proxy-binding-name>stateful-rmi-invoker</invoker-proxy-binding-name>
                 </invoker>
                 <invoker>
                 <invoker-proxy-binding-name>iiop</invoker-proxy-binding-name>
                 </invoker>
                 </invoker-bindings>
                 </session>
                 </enterprise-beans>
                 </jboss>
                

                I will try out with EJB2.1 too. Can this be an ejb3 specific problem, maybe I need to set something else, or my app server has the problem?

                • 5. Re: EJB3 & IIOP
                  atteeeeeee

                  Ok, I found this
                  http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74659
                  I will solve it in another way.