This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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

Win a copy of Head First Android this week in the Android forum!
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: 17271

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
jQuery in Action, 3rd edition
subject: swing
It's not a secret anymore!