Hi,
I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans.
My Business Logic beans are making database accesses to manipulate the underlying data model. I am planning on using the struts db connection pool, which is supplied through the DataSource. My problem is that access to the DataSource is through the servlet.getDataSource() call. How do I make the Business Logic beans unaware of the servlet/http layer (as suggested in the developers guide) while still making the DataSource available to the Business Logic beans? Do I have to pass a reference to the DataSource on every call the Business Logic beans (not an option that I like), or is there a cleaner way to do this? I also have a similar issues with logging services.
I believe that a common way to solve this problem is to bind the DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe that this functionality is supplied in either Tomcat or Struts.
Thank You,
Carles

