• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Access EJB from different app server

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1381
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :-)
 
Always look on the bright side of life. At least this ad is really tiny:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic