This content has been marked as final.
Show 2 replies
-
1. Re: Howto: acces from bean to another SFSB?
delphi'sghost Jun 26, 2007 12:36 PM (in response to statelessbean)If I'm understanding your question, you could just use a factory method to create the bean and initialize it on demand.
@Factory(name="gameAction",scope=SESSION) public GameAction initGameAction() { GameAction result = new GameAction(someId,someName); return result; }
When you inject it simply specifiy that you want to create it if it doesn't exist.//in some other bean @In(create=true) private GameAction gameAction;
-
2. Re: Howto: acces from bean to another SFSB?
statelessbean Jun 27, 2007 2:59 AM (in response to statelessbean)Can U explain me for what reason u use @Factory here? What this do?
@Factory(name="gameAction",scope=SESSION) public GameAction initGameAction() { GameAction result = new GameAction(someId,someName); return result; }
Maybe better way is to create in method my bean and outject using @Out like//in some other bean @Out private GameAction gameAction;