When developing Java EE applications how do I separate Business Logic so it can be reused?
I inherited an application that is mostly Model 1. Business logic is located in JSPs, Servlets and DAO code.
I want to separate the business logic but I am confused by all of the frameworks etc. that exist.
I am looking into Hibernate with JPA to handle all database persistence. Currently all SQL is hand coded and separate SQL is used for different RDBMS. My DAOs will call the code necessary for persistence.
I am thinking of using Struts for my web layer. The part I don't understand is the Business Logic.
I don't want my logic tied to the Web Layer because I want to reuse the logic in a Java SE application.
I thought about putting business logic in Entity classes but that seems like a bad idea.
Is there some technology or pattern that can be used as a guideline for creating reusable business logic?
If I am not clear I will edit.
Thank you.