This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Author

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?

thanks,

ray.
Paul Sturrock
Bartender

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Ray,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Gotcha,
thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Passing List/Objects/primitives between beans
 
Similar Threads
Need IT Job in Canada
Rueben or Clay??
Labels with Name in Javaranch Forum Site
Any chance that you will have a While X'mas?
unable to access jsp pages