How about we create a <tomcat_home>/ejbapps directory by default? This would be the directory where you place your shared ejb-jar files. Of course we would still let users specify a different location for the shared apps, but I think this would be an easy default for a Tomcat admin to understand.

-dain

On Mar 29, 2005, at 11:56 AM, Jacek Laskowski wrote:

Lajos wrote:
Howdy -

Howdy!

Finally someone's stepped forward and will clean it up! ;)

3) As a Tomcat-level container with two-tiered classloaders
In this scenario, OpenEJB is run at the Tomcat level via a special webapp. By default, and if openejb.home is specified correctly, it loads all libraries, beans and the configuration file from external $OPENEJB_HOME directory.
However, we use two classloaders. One classloader is the common classloader, and beans that will be visible to each webapp. The other classloader is webapp-specific, and loads beans visible only to the webapp itself. This is exactly the same scenario used by Tomcat.

So, would the libs from openejb.base be loaded into the common classloader and those from openejb.home into the webapp-specific cl?


Would that be only valid in OpenEJB embedded in Tomcat?

After testing out various other options in the codebase, I have come to the conclusion that this scenario is important to have and will be understood easily by users who are already familiar with Tomcat's classloading scheme. David and I have agreed that we should push for this option in version 1.1 and not unduly delay 1.0.

+1

So the question is: should we, for the sake of clarity, redefine openejb.home and openejb.base? Personally, even as an author of a book on Tomcat, I find the idea of $CATALINA_HOME and $CATALINA_BASE completely unintuitive and confusing. Even if they do it that way, no reason why we should continue the confusion.

Yes, yes, yes!!! Get rid of the unintuitive names and replace it with something people will understand easily.


+100000000000

<proposal>
My proposal therefore is that we rename openejb.home as openejb.install, to refer to the directory containing the OpenEJB installation - $OPENEJB_HOME, in other words.
I propose that we then rename openejb.base as openejb.local, to refer to the WEB-INF directory for a web application.
I propose that in Scenario # 2, no libraries in WEB-INF/lib can be loaded by OpenEJB - let's eliminate the possibility of loading some oe libraries from openejb.install/lib and some from openejb.local/lib.
I propose that in Scenario # 2, if no conf file is provided, $OPENEJB_HOME/conf/openejb.xml is used, and only beans in $OPENEJB_HOME/beans are loaded. If a webapp wants beans from WEB-INF/beans to be loaded, then the webapp is going to have to have its own conf file.
Alternatively, we could allow a webapp-specific OpenEJB instance to load beans from WEB-INF/beans simply by adding another parameter to web.xml: load-local-beans = true. I have already done this in the code, by the way, but not done a commit. If you want to try it out first, I'll do the commit and you can give it a spin.
</proposal>

It was a busy month, wasn't it? ;)

+1 for the changes.

Lajos

Jacek



Reply via email to