• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New session bean or helper

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic