ejb@glassfish.java.net

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

From: Sinnathamby, Sutharman <sutharman.sinnathamby_at_juliusbaer.com>
Date: Mon, 15 Dec 2008 08:59:42 +0800

Hi,
 
It works now. I haven't changed the approach. Suddenly it started to
work fine. Still I couldn't figure out what happed earlier. There may be
some network issues.
 

Thanks & Regards,

Sutha.

 


________________________________

From: Sinnathamby, Sutharman
Sent: Wednesday, December 10, 2008 2:02 PM
To: 'ejb_at_glassfish.dev.java.net'
Subject: RE: Re: Problem accessing a remote EJB from EJB tier of the
other Application


Hi,
 
Pls find the server side error;
 
[#|2008-12-10T09:53:07.071+0800|WARNING|sun-appserver9.1|javax.enterpris
e.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=44;_ThreadName=p:
thread-pool-1; w:
148;IIOP_CLEAR_TEXT;159.103.199.60;3700;_RequestID=ebc0f319-54a5-40f8-af
bf-d46e5569463c;|"IOP00410201: (COMM_FAILURE) Connection failure:
socketType: IIOP_CLEAR_TEXT; hostname: 159.103.199.60; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
 at
com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBU
tilSystemException.java:2690)
 at
com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBU
tilSystemException.java:2711)
 at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(Soc
ketOrChannelConnectionImpl.java:261)
 at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(Soc
ketOrChannelConnectionImpl.java:274)
 at
com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createCon
nection(SocketOrChannelContactInfoImpl.java:130)
 at
com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginReq
uest(CorbaClientRequestDispatcherImpl.java:192)
 at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClie
ntDelegateImpl.java:181)
 at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
 at
org.omg.CosTransactions._CoordinatorStub.register_synchronization(_Coord
inatorStub.java:235)
 at
com.sun.jts.CosTransactions.TopCoordinator.register_synchronization(TopC
oordinator.java:2433)
 at
com.sun.jts.jta.TransactionState.registerSynchronization(TransactionStat
e.java:434)
 at
com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.
java:304)
 at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransactio
n(J2EETransactionManagerOpt.java:462)
 at
com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:3273
)
 at
com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1244)
 at
com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvoca
tionHandler.java:202)
 at
com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObje
ctInvocationHandlerDelegate.java:77)
 at $Proxy32.findRoles(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveT
ie.java:154)
 at
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch
ToServant(CorbaServerRequestDispatcherImpl.java:687)
 at
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch
(CorbaServerRequestDispatcherImpl.java:227)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestReq
uest(CorbaMessageMediatorImpl.java:1846)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Co
rbaMessageMediatorImpl.java:1706)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(Corb
aMessageMediatorImpl.java:1088)
 at
com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callbac
k(RequestMessage_1_2.java:223)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Co
rbaMessageMediatorImpl.java:806)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMe
ssageMediatorImpl.java:563)
 at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMess
ageMediatorImpl.java:2567)
 at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run
(ThreadPoolImpl.java:555)
Caused by: java.lang.RuntimeException: java.net.ConnectException:
Connection timed out
 at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketF
actory.java:347)
 at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(Soc
ketOrChannelConnectionImpl.java:244)
 ... 29 more
Caused by: java.net.ConnectException: Connection timed out
 at sun.nio.ch.Net.connect(Native Method)
 at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
 at
com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.ja
va:105)
 at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketF
actory.java:332)
 ... 30 more
 

________________________________

From: Ken.Cavanaugh_at_Sun.COM [mailto:Ken.Cavanaugh_at_Sun.COM]
Sent: Wednesday, December 10, 2008 1:40 PM
To: ejb_at_glassfish.dev.java.net
Cc: Ken Cavanaugh
Subject: Re: Problem accessing a remote EJB from EJB tier of the other
Application



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;
        

        1. Included the Remote EJB jar file into the classpath.
        2. 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-n
ame>
        </ejb-ref>

        3. Use the @EJB annotation in the JSF back bean;

        @EJB(name=" AuthorizationServiceRef")

        4. 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;
        

        1. Included the Remote EJB jar file into the classpath.
        2. Add the @EJB(mappedName=" corbaname:iiop:<host>:<port>
#ejb/AuthorizationService") in a stateless session bean.
        3. 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.enterpris
e.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=21;_ThreadName=http
SSLWorkerThread-8080-1;1800000;_RequestID=f188487e-0b0b-447f-9919-254604
f83316;|"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.communicationsTimeo
utWaitingForResponse(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.communicationsTimeo
utWaitingForResponse(ORBUtilSystemException.java:3195)
                        at
com.sun.corba.ee.impl.transport.CorbaResponseWaitingRoomImpl.waitForResp
onse(CorbaResponseWaitingRoomImpl.java:198)
                        at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.waitForRes
ponse(SocketOrChannelConnectionImpl.java:1196)
                        at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.waitForResponse(
CorbaMessageMediatorImpl.java:291)
                        at
com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshali
ngComplete1(CorbaClientRequestDispatcherImpl.java:389)
                        at
com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshali
ngComplete(CorbaClientRequestDispatcherImpl.java:357)
                        at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClien
tDelegateImpl.java:219)
                        at
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.private
Invoke(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(BCELStub
Base.java:225)
                        at
com.juliusbaer.iafs.remote.__IAuthorizationService_Remote_DynamicStub.fi
ndRoles(com/juliusbaer/iafs/remote/__IAuthorizationService_Remote_Dynami
cStub.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:

        1. We tried with lookup the InitialContext.
        2. 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.