• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New session bean or helper

 
Jacek Ostrowski
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Lets assume that I have a SLSB that has to handle complex task.
I need to decompose task and delegate subtasks to other components.
So I can create helpers or local SLSBs.

Which one is better and when ?
- Both will provide reuse
- Using helper is cheap, but SLSB are pooled
- SLSB is better for task that require transaction control

Any sugesstions what do you consider when making such decision ?

Jacek
 
Panindrakumar Balellugari
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It mainly depends on why you�re using SLSB to implement this task. I assume that you want to use container provided abilities of transaction, security, threading etc functionality instead of coding them on your own.

As you have said all these tasks are sub tasks that is implemented by SLSB since you got all the features that you need as i said above. I would recommend using helper classes to implement the sub tasks.

One more thing to keep in mind before you start creating helper classes is that, if you think that these sub tasks can be invoked directly without the need of main task then you have to think this through before.

Thanks,
Panindra
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic