Easybeans with CMI

View: New views
6 Messages — Rating Filter:   Alert me  

Easybeans with CMI

by Brice Ruzand :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, everybody

I try to setup ejb loadbalancing bettween some JOnAS servers which use easybeans.
For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).

If add CMI features between them (add cmi://localhost:48021,localhost:48022) it does not work.
I 've got the following error (see attachment) : Cannot find the container with id '24728359'.

The strange thing is that there is 2 lookup :
  • lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote) on localhost:48021
  • lookup(RMI_SERVER_RPC) on localhost:48022
Did I do something wrong ?

An other question  :
Is it possible to enable cmi and jrmp (both), it does not seems to work
# jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
carol.protocols=cmi,jrmp

Thank you

Brice

--
Brice Ruzand
Bull, Architect of an Open World TM
http://www.bull.com


Pinging ...
12:33:11 DEBUG [springframework.jndi.JndiTemplate#lookup:128] Looking up JNDI object with name [test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote]
12:33:11 DEBUG [objectweb.carol.jndi#debugJndiCarol:178] Use provider URL of the environment 'cmi://localhost:48021,localhost:48022'.
12:33:11 DEBUG [objectweb.carol.jndi#debugJndiCarol:178] No INITIAL_CONTEXT_FACTORY, use 'org.objectweb.carol.jndi.spi.CmiContextWrapperFactory' as InitialContext factory.
12:33:11 DEBUG [carol.cmi.jndi#debugCmiJndi:183] lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)
12:33:11 INFO  [objectweb.carol.cmi#infoCmi:144] choose a registry Stub (random) -> [objectId:null,stub:RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[localhost:48021](remote),objID:[0:0:0, -1027008255]]]]]
12:33:11 DEBUG [carol.cmi.jndi#debugCmiJndi:183] lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote) returned
12:33:11 DEBUG [carol.cmi.jndi#debugCmiJndi:183] lookup(RMI_SERVER_RPC)
12:33:11 INFO  [objectweb.carol.cmi#infoCmi:144] choose a registry Stub (random) -> [objectId:null,stub:RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[localhost:48022](remote),objID:[0:0:0, -1027008255]]]]]
12:33:11 DEBUG [carol.cmi.jndi#debugCmiJndi:183] lookup(RMI_SERVER_RPC) returned
12:33:11 DEBUG [objectweb.carol.rmi#debugRmiCarol:217] JClientInterceptorHelper send request with remote contexts
12:33:11 DEBUG [objectweb.carol.rmi#debugRmiCarol:217] ctx:org.objectweb.jonas.security.interceptors.jrmp.SecurityServiceContext@aa4c7c
12:33:11 DEBUG [objectweb.carol.rmi#debugRmiCarol:217] JClientInterceptorHelper receive exception contexts
12:33:11 DEBUG [objectweb.carol.rmi#debugRmiCarol:217] JClientInterceptorHelper getObjectFromInput no context
12:33:11 ERROR [[localhost].[/ping-webapp].[PingServlet]#invoke:260] Servlet.service() for servlet PingServlet threw exception
javax.ejb.EJBException: Error while sending a request
        at org.ow2.easybeans.proxy.client.ClientRPCInvocationHandler.invoke(ClientRPCInvocationHandler.java:147)
        at $Proxy1.pingDbLoadBalance(Unknown Source)
        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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
        at $Proxy0.pingDbLoadBalance(Unknown Source)
        at test.lb.service.delegate.LbDelegate.pingDbLoadBalance(LbDelegate.java:33)
        at test.lb.serlet.PingServlet.doGet(PingServlet.java:48)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        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.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:62)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: Error while handling answer on the remote side
        at org.ow2.easybeans.rpc.rmi.client.RMIClientRPC.sendEJBRequest(RMIClientRPC.java:104)
        at org.ow2.easybeans.proxy.client.ClientRPCInvocationHandler.invoke(ClientRPCInvocationHandler.java:144)
        ... 39 more
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.RemoteException: Cannot find the container with id '24728359'.
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
        at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.dispatch(JUnicastServerRef.java:143)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at org.objectweb.carol.rmi.jrmp.server.JRemoteCall.executeCall(JRemoteCall.java:89)
        at org.objectweb.carol.rmi.jrmp.server.JUnicastRef.performRemoteCall(JUnicastRef.java:194)
        at org.objectweb.carol.rmi.jrmp.server.JUnicastRef.invoke(JUnicastRef.java:158)
        at org.ow2.easybeans.rpc.rmi.server.RMIServerRPCImpl_Stub.getEJBResponse(RMIServerRPCImpl_Stub.java:47)
        at org.ow2.easybeans.rpc.rmi.client.RMIClientRPC.sendEJBRequest(RMIClientRPC.java:102)
        ... 40 more
Caused by: java.rmi.RemoteException: Cannot find the container with id '24728359'.
        at org.ow2.easybeans.rpc.rmi.server.RMIServerRPCImpl.getEJBResponse(RMIServerRPCImpl.java:82)
        at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.dispatch(JUnicastServerRef.java:143)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        ... 1 more

Re: Easybeans with CMI

by Loris Bouzonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Brice,

If you use JOnAS 4.x, CMIv1 doesn't support EJB3s.
If you use JOnAS 5.x, CMIv2 supports them, but the configuration is  
quite different,
since CMI is no more a protocol for Carol.

Regards,
Loris

Brice Ruzand <brice.ruzand@...> a écrit :

> Hi, everybody
>
> I try to setup ejb loadbalancing bettween some JOnAS servers which use
> easybeans.
> For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).
>
> If add CMI features between them (add
> cmi://localhost:48021,localhost:48022) it does not work.
> I 've got the following error (see attachment) : Cannot find the
> container with id '24728359'.
>
> The strange thing is that there is 2 lookup :
>
>    * lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)
>      on localhost:48021
>    * lookup(RMI_SERVER_RPC) on localhost:48022
>
> Did I do something wrong ?
>
> An other question  :
> Is it possible to enable cmi and jrmp (both), it does not seems to work
>
>    # jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
>    carol.protocols=cmi,jrmp
>
>
> Thank you
>
> Brice
>
> --
>
> Brice Ruzand
> Bull, Architect of an Open World TM
> http://www.bull.com



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Parent Message unknown Re: Easybeans with CMI

by Brice Ruzand :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to use CMIv2 in JOnAS 4.x (4.8.x)
Because I really need to have ejb load-balancing feature with ejb3.

A year ago Florent tells me that it will work, but he didn't tell me a
such limitation.

Thank's for your answer.

Brice

Loris Bouzonnet a écrit :

> Hi Brice,
>
> If you use JOnAS 4.x, CMIv1 doesn't support EJB3s.
> If you use JOnAS 5.x, CMIv2 supports them, but the configuration is
> quite different, since CMI is no more a protocol for Carol.
>
> Regards,
> Loris
>
> Brice Ruzand <brice.ruzand@...> a écrit :
>
>> Hi, everybody
>>
>> I try to setup ejb loadbalancing bettween some JOnAS servers which use
>> easybeans.
>> For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).
>>
>> If add CMI features between them (add
>> cmi://localhost:48021,localhost:48022) it does not work.
>> I 've got the following error (see attachment) : Cannot find the
>> container with id '24728359'.
>>
>> The strange thing is that there is 2 lookup :
>>
>>    *
>> lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)
>>      on localhost:48021
>>    * lookup(RMI_SERVER_RPC) on localhost:48022
>>
>> Did I do something wrong ?
>>
>> An other question  :
>> Is it possible to enable cmi and jrmp (both), it does not seems to work
>>
>>    # jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
>>    carol.protocols=cmi,jrmp
>>
>>
>> Thank you
>>
>> Brice
>>
>> --
>>
>> Brice Ruzand
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>

--

Brice Ruzand
Bull, Architect of an Open World TM
http://www.bull.com
01 49 45 50 16



Re: Re: Easybeans with CMI

by Loris Bouzonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Unfortunately, I think that backporting CMIv2 on JOnAS 4.x should be  
an hard task: Carol v3 should be also backported and JOnAS 4.x is  
really CMIv1-aware.

Brice Ruzand <brice.ruzand@...> a écrit :

> Is there a way to use CMIv2 in JOnAS 4.x (4.8.x)
> Because I really need to have ejb load-balancing feature with ejb3.
>
> A year ago Florent tells me that it will work, but he didn't tell me a
> such limitation.
>
> Thank's for your answer.
>
> Brice
>
> Loris Bouzonnet a écrit :
>> Hi Brice,
>>
>> If you use JOnAS 4.x, CMIv1 doesn't support EJB3s.
>> If you use JOnAS 5.x, CMIv2 supports them, but the configuration is  
>>  quite different, since CMI is no more a protocol for Carol.
>>
>> Regards,
>> Loris
>>
>> Brice Ruzand <brice.ruzand@...> a écrit :
>>
>>> Hi, everybody
>>>
>>> I try to setup ejb loadbalancing bettween some JOnAS servers which use
>>> easybeans.
>>> For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).
>>>
>>> If add CMI features between them (add
>>> cmi://localhost:48021,localhost:48022) it does not work.
>>> I 've got the following error (see attachment) : Cannot find the
>>> container with id '24728359'.
>>>
>>> The strange thing is that there is 2 lookup :
>>>
>>>   *  
>>> lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)
>>>     on localhost:48021
>>>   * lookup(RMI_SERVER_RPC) on localhost:48022
>>>
>>> Did I do something wrong ?
>>>
>>> An other question  :
>>> Is it possible to enable cmi and jrmp (both), it does not seems to work
>>>
>>>   # jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
>>>   carol.protocols=cmi,jrmp
>>>
>>>
>>> Thank you
>>>
>>> Brice
>>>
>>> --
>>>
>>> Brice Ruzand
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>>
>
> --
>
> Brice Ruzand
> Bull, Architect of an Open World TM
> http://www.bull.com
> 01 49 45 50 16



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Re: Re: Re: Easybeans with CMI

by Brice Ruzand :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is the main trouble that makes CMIv1 not support EJB3s. Is there
any by-pass, cause we only needs ejb loadbalancing on ESLB
(http://jonas.objectweb.org/current/doc/doc-en/integrated/howto/Clustering.html#toc_ejb_loadbalance)
Can you me some clues, on any any  change that I could done in cmiv1 to
have our own limited support to EJB3s.

Thank you again,

Brice

Loris Bouzonnet a écrit :

> Unfortunately, I think that backporting CMIv2 on JOnAS 4.x should be
> an hard task: Carol v3 should be also backported and JOnAS 4.x is
> really CMIv1-aware.
>
> Brice Ruzand <brice.ruzand@...> a écrit :
>
>> Is there a way to use CMIv2 in JOnAS 4.x (4.8.x)
>> Because I really need to have ejb load-balancing feature with ejb3.
>>
>> A year ago Florent tells me that it will work, but he didn't tell me a
>> such limitation.
>>
>> Thank's for your answer.
>>
>> Brice
>>
>> Loris Bouzonnet a écrit :
>>> Hi Brice,
>>>
>>> If you use JOnAS 4.x, CMIv1 doesn't support EJB3s.
>>> If you use JOnAS 5.x, CMIv2 supports them, but the configuration is
>>>  quite different, since CMI is no more a protocol for Carol.
>>>
>>> Regards,
>>> Loris
>>>
>>> Brice Ruzand <brice.ruzand@...> a écrit :
>>>
>>>> Hi, everybody
>>>>
>>>> I try to setup ejb loadbalancing bettween some JOnAS servers which use
>>>> easybeans.
>>>> For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).
>>>>
>>>> If add CMI features between them (add
>>>> cmi://localhost:48021,localhost:48022) it does not work.
>>>> I 've got the following error (see attachment) : Cannot find the
>>>> container with id '24728359'.
>>>>
>>>> The strange thing is that there is 2 lookup :
>>>>
>>>>   *  
>>>> lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)
>>>>
>>>>     on localhost:48021
>>>>   * lookup(RMI_SERVER_RPC) on localhost:48022
>>>>
>>>> Did I do something wrong ?
>>>>
>>>> An other question  :
>>>> Is it possible to enable cmi and jrmp (both), it does not seems to
>>>> work
>>>>
>>>>   # jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
>>>>   carol.protocols=cmi,jrmp
>>>>
>>>>
>>>> Thank you
>>>>
>>>> Brice
>>>>
>>>> --
>>>>
>>>> Brice Ruzand
>>>> Bull, Architect of an Open World TM
>>>> http://www.bull.com
>>>
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>>
>>
>> --
>>
>> Brice Ruzand
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>> 01 49 45 50 16
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>

--

Brice Ruzand
Bull, Architect of an Open World TM
http://www.bull.com
01 49 45 50 16



Re: Re: Re: Re: Easybeans with CMI

by Loris Bouzonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here some clues to add support of EJB3 on CMIv1:
* The CMI stubs need to be patched since they are related to EJB2
* EZB needs a dedicated component to perform the interception at bind
* I don't know if the replication of registry will immediately work  
with EasyBeans
because EZB doesn't bind stubs but References.

Regards,
Loris

Brice Ruzand <brice.ruzand@...> a écrit :

> What is the main trouble that makes CMIv1 not support EJB3s. Is there
> any by-pass, cause we only needs ejb loadbalancing on ESLB
> (http://jonas.objectweb.org/current/doc/doc-en/integrated/howto/Clustering.html#toc_ejb_loadbalance)
> Can you me some clues, on any any  change that I could done in cmiv1 to
> have our own limited support to EJB3s.
>
> Thank you again,
>
> Brice
>
> Loris Bouzonnet a écrit :
>> Unfortunately, I think that backporting CMIv2 on JOnAS 4.x should  
>> be an hard task: Carol v3 should be also backported and JOnAS 4.x  
>> is really CMIv1-aware.
>>
>> Brice Ruzand <brice.ruzand@...> a écrit :
>>
>>> Is there a way to use CMIv2 in JOnAS 4.x (4.8.x)
>>> Because I really need to have ejb load-balancing feature with ejb3.
>>>
>>> A year ago Florent tells me that it will work, but he didn't tell me a
>>> such limitation.
>>>
>>> Thank's for your answer.
>>>
>>> Brice
>>>
>>> Loris Bouzonnet a écrit :
>>>> Hi Brice,
>>>>
>>>> If you use JOnAS 4.x, CMIv1 doesn't support EJB3s.
>>>> If you use JOnAS 5.x, CMIv2 supports them, but the configuration  
>>>> is  quite different, since CMI is no more a protocol for Carol.
>>>>
>>>> Regards,
>>>> Loris
>>>>
>>>> Brice Ruzand <brice.ruzand@...> a écrit :
>>>>
>>>>> Hi, everybody
>>>>>
>>>>> I try to setup ejb loadbalancing bettween some JOnAS servers which use
>>>>> easybeans.
>>>>> For my test I have 3 JOnAS : 1 client (webapp) and 2 sever (ejbs).
>>>>>
>>>>> If add CMI features between them (add
>>>>> cmi://localhost:48021,localhost:48022) it does not work.
>>>>> I 've got the following error (see attachment) : Cannot find the
>>>>> container with id '24728359'.
>>>>>
>>>>> The strange thing is that there is 2 lookup :
>>>>>
>>>>>  *    
>>>>> lookup(test.lb.service.facade.LbFacade_test.lb.service.LbService@Remote)  
>>>>>     on localhost:48021
>>>>>  * lookup(RMI_SERVER_RPC) on localhost:48022
>>>>>
>>>>> Did I do something wrong ?
>>>>>
>>>>> An other question  :
>>>>> Is it possible to enable cmi and jrmp (both), it does not seems to work
>>>>>
>>>>>  # jonas rmi activation (iiop, irmi, jrmp, jeremie, cmi)
>>>>>  carol.protocols=cmi,jrmp
>>>>>
>>>>>
>>>>> Thank you
>>>>>
>>>>> Brice
>>>>>
>>>>> --
>>>>>
>>>>> Brice Ruzand
>>>>> Bull, Architect of an Open World TM
>>>>> http://www.bull.com
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>>
>>>>
>>>
>>> --
>>>
>>> Brice Ruzand
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>> 01 49 45 50 16
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>>
>
> --
>
> Brice Ruzand
> Bull, Architect of an Open World TM
> http://www.bull.com
> 01 49 45 50 16



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

LightInTheBox - Buy quality products at wholesale price!