Tomcat does have some scheme for including the context XML within the WEB-INF of the web app itself, but I don't know the details of exactly how it works. They do this for their own manager webapp (in server/webapps). I suggest examining this route to see if it can be applied to normal webapps in Tomcat as well. If it applies, it would allow you to include the appropriately named context xml file in your webapp when you upload that. Check the Tomcat docs for further info. I can't give you a precise reference unfortunately; you may have to experiment locally to understand the specific behavior.

Failing that route, it's also possible to create the DBCP BasicDataSource explicitly in code if you're willing to modify the Roller sources. I'm not sure if it is possible to deal with the Realm that way though, but it may be. This is definitely a less desirable route long term.

Sorry for lateness of the response and the brevity now.

--a.


----- Original Message ----- From: "Dave Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, July 11, 2005 6:49 AM
Subject: Re: Datasource without server.xml / roller_tomcat_5_0.xml



I'm not aware of any other way to create a datasource in Tomcat. It is possible that you could configure Hibernate to use the JDBC DataManager instead of a configuring a datasource. To do that you'd have to hack WEB-INF/classes/hibernate.cfg.xml. There is an example of a DataManager base config in that file, but it is commented out.

        <!--
        Examples for configuring Hibernate to use the JDBC Driver  Manager
        <property  
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</ property>
        <property  
name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:3219</ property>
        <property name="hibernate.connection.username">sa</property>
        <property name="hibernate.connection.password"></property>
        <property  name="hibernate.dialect">net.sf.hibernate.dialect.HSQLDialect</ 
property>

But, you'll still need a way to configure Tomcat to authenticate against the Roller database. So I guess you are stuck, unless you want to rip and replace Roller's authentication system.

Not good. I guess my recommendation is: if your ISP won't allow you to  
configure your app, find another ISP.

- Dave



On Jul 1, 2005, at 2:50 AM, Torben Norling wrote:

Hi,
I'm planning on using Roller 1.2 and right now I'm looking for an ISP  here
in Sweden that supports Tomcat 5+. I have found one that looks pretty  good
but it seems like I don't have access to server.xml or app.level  context
settings like roller_tomcat_5_0.xml. Ok, they have another "account  level"
that gives me my own JVM that would solve it but the price rises  pretty much
then.

My question is if it is possible to place these settings in web.xml  instead
or if anyone have another tips how to handle this... I know this  question is
more kind of Tomcat specific, sorry about that.

Thanks // Torben Norling

Reply via email to