EJB help

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
LVL 16
suprapto45Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
You can simply connect to it through anything that can access a JNDI provider and the client stubs
0
suprapto45Author Commented:
can you describe more CEHJ, btw thanks for your prompt reply.

Thanks

Regards
Dave
0
TimYatesCommented:
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

durgaprasad_jCommented:
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
CEHJCommented:
Here's an overview of EJB from the client perspective:

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TimYatesCommented:
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
suprapto45Author Commented:
Thanks, let try those solutions. Btw, you all are awesome. You all are robot's brain :)

Regards
Dave
0
CEHJCommented:
:-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.