• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

EJB lookup from WPS Portal

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am developing JSR-168 portlets on WPS 5.1. I need to interact with some EJB's deployed in Weblogic server. How can I make the portal server communicate with the Application server. I know we set up a provider url in the properties file. But how should the lookup be done?

Thanks
 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
There is nothing special that you need to do in JSR 168 / portlet applications to invoke EJB calls. Its the same way you invoke in a J2EE application.

Make sure you have the client jar in classpath (either in <portal installation directory>/shared/app folder or the portlet application WEB-INF/lib folder or any folder thats in the classpath for portal)..

Then all you do is use proper URL and JNDI lookup to get the reference of the home and then onwards it regular EJB calling mechanism...

do you have specific problems related to the calls?....I hope this helps


Regards,
Dharmesh
 
author and cow tipper
Posts: 5006
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dorothy Taylor:
Hi
I am developing JSR-168 portlets on WPS 5.1.... But how should the lookup be done?



There's not problem looking up an EJB from the portal. Just think of your portlets as though there were any other Servlet/JSP type of application in this regards.

As far as looking up your EJB, you really should go through a service locator. The Service Locator pattern is well established, and there's lots of documentation on how to implement it. Plus, you'll impress everyone on your team by using a "Design Pattern."

Good luck!

-Cameron McKenzie
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, is this architecture correct then:

Portal creates a business delegate. The business delegate uses the Service Locatorto do a lookup on the Service(session bean). Also, it obtains the service id for the first time that can be used in subsequent calls so that teh lookup can be obviated.
Also is there any need of Portlet Service? In the above approach we are not creating any Portlet Service.

Please confirm if this design approach is appropriate

Thanks
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic