This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Access EJB from Remote POJO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Access EJB from Remote POJO" Watch "Access EJB from Remote POJO" New topic

Access EJB from Remote POJO

Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

Hi, I'm completely new to EJB, and I was wondering if anyone could help me out with my problem:
I have an EJB 3.0 deployed on a server, and am trying to access it from a POJO from a separate machine. I've looked up on lots of examples, but none of them seem to help. Could somebody please help me out? Oh yeah, I'm using WebLogic 10.3.4 and JDeveloper, if it matters.
Also, is there anything I need to do on the server end or any other environment settings? I'm pretty new at this, I'm still learning, so please bear with me.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Rather that me just posting another example, could you show us what you've got so far and maybe explain what's going wrong?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

I deployed the following EJB onto a remote server(along with the remote and local interfaces):

Then I created a new project, where I created tis POJO to act as client:

When I ran the client, nothing worked. I'm sorry, but I don't have the error log with me right now, but I shall post it tomorrow as soon as I return to my office. Now, the weird thing was, this code worked smoothly when I ran it on my home system, and I have the exact same configuration here as my office, except for the server being on the same system as JDev. I still used the remote interface, though. I also altered Context.PROVIDED_URL to localhost:7001.
Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

Hi, again, it seems that the entire thing was an issue with the deployment of the app. I manually created an EAR file with Ant, and deployed it to the remote server, after which, using the remote client, described above,the operartion wnt out fine. Sorry to post before checking exhaustively on my own first. Thanks anyway.
subject: Access EJB from Remote POJO
Similar Threads
JBoss EJB Client Jar
Weblogic SSL certificate
How to use servlets in POJO
Using SessionBeans from POJO within the ear...
how to access one ejb with local interface from different application deployed in same server.