File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access EJB from different app server

 
brijesh chavda
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a JSF web application which is deployed on Glassfish server and i have EJB 3 components deployed on weblogic 10 server. How can i call those EJBs from the JSF managed beans.
I tried to use InitialContext by setting context factory to weblogic context factory and putting wlclient.jar in the classpath of JSF web app. It doesnt work. JSF application is failed to deploy.

Is there something i am missing.

Any quick help is really really appreciable.

Thanks,
Brijesh
 
K Kiran Kumar
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brijesh,

I hope you are trying to call the Bean that implemented the Remote interface. I have done using WebSphere. I guess the logic should be the same. Can you please use the below code and try to call the EJB method.
 
brijesh chavda
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kiran,

Yes thats what i tried. I put the weblogic context factory in the properties and put wlclient.jar in classpath of glassfish (I tried putting it in lib folder of my WEB-INF too.) . It looks like weblogic client jar is creating some conflicts with glassfish. My application failed to deploy.
If i remove wlclient.jar, Application deploys fine without error.

Thanks,
Brijesh
 
Claude Moore
Ranch Hand
Posts: 747
7
IBM DB2 Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like weblogic client jar is creating some conflicts with glassfish. My application failed to deploy.


It doesn't sound new to me. Years ago, I tried a similar approach (let two different appserver talk each to other using EJBs) and after a while I gave up. Since my application servers were in LAN, and I did not need a lot of different services to be used by each other, I used webservices instead, and that approach worked.

It's a pity. EJBs are powerful and I like them a lot, but in my humble opinion when you're using them outside the appserver there are always troubles (lot of jars on the client side to be deployed, jar conflicts and others).

I'm sorry to not be able to advice you better, but I think you'd better try webservices to avoid such issues. No headaches :-)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic