?
Solved

EJB help

Posted on 2005-03-07
8
Medium Priority
?
242 Views
Last Modified: 2013-11-24
Hello,

My company has one server where all the EJB resides. Now, I want to my local PC connected to that EJB ( I mean I want to execute some of the methods provided in the EJB on that particular computer). If I develop web application (using Bea), what information do I need? Can I connect to that EJB using Java standalone (using Socket), not web application?

Thanks

Regards
Dave
0
Comment
Question by:suprapto45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 13475990
You can simply connect to it through anything that can access a JNDI provider and the client stubs
0
 
LVL 16

Author Comment

by:suprapto45
ID: 13476003
can you describe more CEHJ, btw thanks for your prompt reply.

Thanks

Regards
Dave
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13476080
You just need to have a JAR file of the Remote and Home interfaces for your EJB app

Then set up the JNDI parameters as usual, and call the EJB app...

This can be from any java code* (both client app, or web app)

Tim

(* apart from J2ME) ;-)
0
Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

 
LVL 6

Assisted Solution

by:durgaprasad_j
durgaprasad_j earned 200 total points
ID: 13476088
hi,

see this post http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21340328.html

he is accessing ejbs from normal client [ that is not the web application].

Good Luck
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 800 total points
ID: 13476094
Here's an overview of EJB from the client perspective:

http://www.javaskyline.com/learnejb.html#topiccli
0
 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 400 total points
ID: 13476119
You just need to do something like:

      java.util.Properties JNDIParm = new java.util.Properties() ;
      JNDIParm.setProperty( InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" ) ;
      JNDIParm.setProperty( InitialContext.PROVIDER_URL, "jnp://yourEJBserver:1099" ) ;
      JNDIParm.setProperty( InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ) ;
      ctx = new InitialContext( JNDIParm ) ;

(that's for JBoss)

Then use the InitialContext "ctx" to look up your EJBs...
0
 
LVL 16

Author Comment

by:suprapto45
ID: 13476153
Thanks, let try those solutions. Btw, you all are awesome. You all are robot's brain :)

Regards
Dave
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13498235
:-)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question