I am working on a web application which is based on struts 2 framework and is deployed on tomcat. Now I have to implement ejb and hibernate for the same application and I'm told that it will be a separate module which will be deployed on jBoss AS 7 server. What I want to know is that is this a good approach or will it be better to deploy the complete project on jBoss and remove tomcat from the picture? (and why?)
Also can you give me a link where I can find the way to make a remote call from tomcat(web service) to jBoss (ejb).
P.S. : Mods, I wasn't sure about where to post my question because its also related to jBoss so if I have posted in the wrong forum then please move it to the appropriate one.
To separate ejb module from web , you have to use Remote Interface .
Remote interfaces paramters are passed by value and
Local interface paremeters are passed by reference there are fundemental semantic differences between the two cases .
you can call Remote EJB by two way-
1- JNDI lookup to call
2- (For GlassFish , may be it will provide you way on jboss) Configure Remote EJB JNDI lookup in sun-web.xml and jar file ( appserv-rt.jar , gf-client.jar , glassfish-naming.jar)
I tried the first option, it still isn't working. I'm getting this:
I think here the ip and port are important, can you tell me what to use.
First tried the same thing as you have mentioned.
Then I tried with localhost and the same port.
and then with localhost and port 4447.
None of these worked.
Can you tell me whether I need to make any changed in JBOSS xml files.
See here is the socket binding list, and there no socket for IIOP. (not whether this is the problem area.)
Can you provide further guidance or any suggestion on further changes I need to make.