ejb@glassfish.java.net

Re: Problem accessing a remote EJB from EJB tier of the other Application

From: Ken Cavanaugh <Ken.Cavanaugh_at_Sun.COM>
Date: Tue, 09 Dec 2008 21:40:27 -0800

On Dec 9, 2008, at 9:02 PM, Sinnathamby, Sutharman wrote:

>
> Hi,
>
> We have two EJB 3.0 applications running in two different glassfish
> application servers. One application need to access a Stateless
> Remote EJB deployed into the other application.

Comments below.

>
> When we access the Remote EJB from the web tier of the other
> application it works fine. The way we access it;
>
> Included the Remote EJB jar file into the classpath.
> Put the ejb-ref entry into the sun-web.xml;
> <ejb-ref>
> <ejb-ref-name>AuthorizationServiceRef</ejb-ref-name>
> <jndi-name>corbaname:iiop:<host>:<port>#ejb/AuthorizationService</
> jndi-name>
> </ejb-ref>
> Use the @EJB annotation in the JSF back bean;
> @EJB(name=” AuthorizationServiceRef”)
> Invoke the methods on the remote object in the same back bean.
>
> But when we try to access the same remote EJB from EJB tier of the
> other application we face an issue. The way we access it;
>
> Included the Remote EJB jar file into the classpath.
> Add the @EJB(mappedName=” corbaname:iiop:<host>:<port> #ejb/
> AuthorizationService”) in a stateless session bean.
> Invoke the methods on the remote object in the same stateless
> session bean.
>
> We do see that the remote object is loaded (injected) into the
> client, but when a method is invoked into the remote object the
> client application is hanged and after some time we get the below
> timeout error;
>
> [#|2008-12-05T11:19:52.384+0800|WARNING|sun-appserver9.1|
> javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|
> _ThreadID
> =
> 21
> ;_ThreadName
> =
> httpSSLWorkerThread
> -8080
> -1;1800000
> ;_RequestID=f188487e-0b0b-447f-9919-254604f83316;|"IOP00410219:
> (COMM_FAILURE) Communications timeout waiting for response.
> Exceeded 1,800,000 milliseconds"
> org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 219 completed:
> Maybe
> at
> com
> .sun
> .corba
> .ee
> .impl
> .logging
> .ORBUtilSystemException
> .communicationsTimeoutWaitingForResponse(ORBUtilSystemException.java:
> 3180)

This says that the client side timed out waiting for a response.
There are several possible causes for this which
cannot be diagnosed from the client side. What CORBA exceptions are
in the server log on the CORBA/EJB server
side?

Ken.

> at
> com
> .sun
> .corba
> .ee
> .impl
> .logging
> .ORBUtilSystemException
> .communicationsTimeoutWaitingForResponse(ORBUtilSystemException.java:
> 3195)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .transport
> .CorbaResponseWaitingRoomImpl
> .waitForResponse(CorbaResponseWaitingRoomImpl.java:198)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .transport
> .SocketOrChannelConnectionImpl
> .waitForResponse(SocketOrChannelConnectionImpl.java:1196)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .protocol
> .CorbaMessageMediatorImpl
> .waitForResponse(CorbaMessageMediatorImpl.java:291)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .protocol
> .CorbaClientRequestDispatcherImpl
> .marshalingComplete1(CorbaClientRequestDispatcherImpl.java:389)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .protocol
> .CorbaClientRequestDispatcherImpl
> .marshalingComplete(CorbaClientRequestDispatcherImpl.java:357)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .protocol
> .CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .presentation
> .rmi
> .StubInvocationHandlerImpl
> .privateInvoke(StubInvocationHandlerImpl.java:192)
> at
> com
> .sun
> .corba
> .ee
> .impl
> .presentation
> .rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:
> 152)
> at
> com
> .sun
> .corba
> .ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:
> 225)
> at
> com
> .juliusbaer
> .iafs
> .remote.__IAuthorizationService_Remote_DynamicStub.findRoles(com/
> juliusbaer/iafs/remote/
> __IAuthorizationService_Remote_DynamicStub.java)
> at
> com
> .juliusbaer.iafs.remote._IAuthorizationService_Wrapper.findRoles(com/
> juliusbaer/iafs/remote/_IAuthorizationService_Wrapper.java)
> at
> com
> .juliusbaer
> .amls.session.ManagerService.findUserRoles(ManagerService.java:167)
>
> Note:
> We tried with lookup the InitialContext.
> We tried with deploying both application in one box(One glassfish
> server) but different domain.
>
> In both cases we get the same issue.
>
> Appreciate if you can help us to resolve this issue.
>
> Thanks & Regards,
> Sutha.
>
> *****JuliusBaer Disclaimer***** This e-mail is for the intended
> recipient only and may contain confidential or privileged
> information. If you have received this e-mail by mistake, please
> contact us immediately and completely delete it (and any
> attachments) and do not forward it or inform any other person of its
> contents. If you send us messages by e-mail, we take this as your
> authorization to correspond with you by e-mail, however, we will not
> accept the electronic transmission of orders/instructions without a
> specific agreement being in place to govern the same. If you do not
> wish to receive any further e-mail correspondence please let us
> know. E-mail transmission cannot be guaranteed to be secure or error-
> free as information could be intercepted, amended, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. Neither
> the Julius Baer Group nor the sender accept liability for any errors
> or omissions in the content of this message which arise as a result
> of its e-mail transmission. Please note that all e-mail
> communications to and from the Julius Baer Group may be monitored.
> This communication is for informational purposes only. It is not
> intended as an offer or solicitation for the purchase or sale of any
> financial instrument or as an official confirmation of any
> transaction.