Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing List/Objects/primitives between beans

 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark your class as Serializable.
 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then I should use lookup? could you refer me to some example please?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gotcha,
thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic