I had a question on how to use a session bean correctly. I have a process where I need to access the database, perform some calculations and run many business rules. Should I have DAOs for data access, util classes for calculations and validations and then create these objects when the session bean is created and cache them so that I could reuse them throughout. Is this the right approach or is there a better way to handle it.
Thanks
aaugusty
-
How to handle business logic inside a session bean (1 messages)
- Posted by: antony augusty
- Posted on: December 14 2004 10:12 EST
Threaded Messages (1)
- How to handle business logic inside a session bean by Pampa S B on December 29 2004 04:13 EST
-
How to handle business logic inside a session bean[ Go to top ]
- Posted by: Pampa S B
- Posted on: December 29 2004 04:13 EST
- in response to antony augusty
Its always better to separate out your DB layer processing in a DAO, so that whereever necessary you can use it. Session bean (Use SessionFacade pattern here) will just call the DAO and gets the related objects. If possible use value objects also.