File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swing" Watch "swing" New topic


Kalyan Rao

Joined: Jun 28, 2001
Posts: 3
How can I access EJB in my Swing application.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

First get your InitialContext for the App Server then you need to use the JNDI lookup to get a reference to the EJB Home object, call create, you then can use the object just like any other object.
That's the short and easy answer to your question.
If you are new to EJBs then you should get a book on EJBs. I suggest This book by O'reilly publishing.
If you have built some EJB's that access other Ejb's using my above steps, then you just do the same in Swing. Good Luck

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Consider Paul's rocket mass heater.
subject: swing