File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Passing List/Objects/primitives between beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Passing List/Objects/primitives between beans" Watch "Passing List/Objects/primitives between beans" New topic

Passing List/Objects/primitives between beans

ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Hi all, I have tried to look in the net, but except of the fact which I have to serialize an object before I can pass it from one stateless bean to another, I have no idea how to achieve this.

anyone could show some example?


Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Mark your class as Serializable.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Then I should use lookup? could you refer me to some example please?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

You use a JNDI lookup (or EJB injection) to get the session bean. You pass the object between beans by passing it as a parameter. Just like any other method call.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
I agree. Here's the link:
subject: Passing List/Objects/primitives between beans
jQuery in Action, 3rd edition