[Opensource] Application Setup
Michael Rimov
rimovm at centercomp.com
Sat Jul 20 03:06:59 PDT 2002
At 12:07 PM 7/17/2002 +0100, you wrote:
>I've been using Struts now for the best part of a year, and came across
>Expresso when looking for something to help with database persistence. I've
>downloaded and installed expresso4-02.war into my appserver (Sybase EAServer
>4.1.1), and gone through most of the user guide and Peter Pilgrim's Best
>Practices doc (BTW when will the user guide be finished? I could really use
>some stuff in Chapters 8 & 10!)
Some of Chapter 10 has been updated in CVS. It definitely has been lagging
behind the main development effort though! [Not that we're alone, JBoss
->paid<- docs are for version 2.4.1 and They're at 3.01RC-1 now :) ]
> I've got some questions regarding
>application setup which hopefully someone can answer.
> From reading the docs it would appear that the intended way of doing things
>is to install Expresso (i.e. deploy Expresso4-02.war), and then 'plug-in'
>your own apps, presumably by packaging them into a .jar file and deploying
>them into the Expresso webapp directory.
Yes this is correct.
>If I need to have multiple webapps
>on a single server built with Expresso using different URL's e.g.
>www.mydomain.com/webapp1 and www.mydomain.com/webapp2, do I need to install
>the whole package for each webapp, or is it possible to have one full
>Expresso installation per server to enable me to administer security etc.
>for all Expresso webapps?
This is an interesting problem, of course! :) It depends on how you want
to do your webapps. Normally Expresso simply has multiple 'sub components'
in the same webapp. But that's a side note. If you want completely
separate security and only one installation the I would recommend having
more than one db-context. Then have the code shared and in your login
page, just add the paramter db=default or db=myapp2 [This is as per defined
in the expresso-config.xml file]
This way you can have one code base with multiple securities. Now, the one
caveat is that since I don't believe most people run their apps that way,
you may run into a bug or two doing it this way. Please let me know if you
have problems.
>If I (can) do this will I lose anything?
>All webapps will operate on the same backend database server, and I intend
>storing all Expresso's setup tables in a seperate database on this server.
If you want a single security context across all the webapps, I don't see
why storing things in the global lib directory won't allow you to do
that. Again, please let me know if you run into problems.
>Also, is there a way to (easily) 'switch off' Expresso's connection pooling?
>My appserver provides it's own which I can access using JNDI.
Unfortunately no... DBObjects are 'hardwired' to DBConnectionPool. We're
working on better decoupling of Expresso's objects. That's what I've been
working on for the past week in 4.1... of course it will be an ongoing
project. One of our major contributors just updated DBConnectionPool to be
able to get JNDI-based connections if that would help. I really will have
ea-4 out the door soon so you can give it a spin to see if that would help.
HTH!
-Mike
More information about the Opensource
mailing list