You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Torben Norling <to...@gmail.com> on 2005/07/01 08:50:11 UTC

Datasource without server.xml / roller_tomcat_5_0.xml

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

Re: Datasource without server.xml / roller_tomcat_5_0.xml

Posted by Matt Raible <mr...@gmail.com>.
I'd recommend kgbinternet.com - they provide good support and are
fairly inexpensive.  I've used them for a couple of years to host
raibledesigns.com.

Matt

On 7/11/05, Dave Johnson <da...@rollerweblogger.org> wrote:
> 
> 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
> 
>

Re: Datasource without server.xml / roller_tomcat_5_0.xml

Posted by Matt Raible <mr...@gmail.com>.
You can put the <Context> in a META-INF/context.xml file of a WAR and
it'll get picked up and deployed by Tomcat 5.  However, the classes
(JARs) that are needed by Resources in context.xml must be already
deployed in Tomcat (in common/lib).

Hope this helps,

Matt
 
On 7/11/05, Anil Gangolli <an...@busybuddha.org> wrote:
> 
> 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" <da...@rollerweblogger.org>
> To: <ro...@incubator.apache.org>
> 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
> 
>

Re: Datasource without server.xml / roller_tomcat_5_0.xml

Posted by Anil Gangolli <an...@busybuddha.org>.
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" <da...@rollerweblogger.org>
To: <ro...@incubator.apache.org>
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 


Re: Datasource without server.xml / roller_tomcat_5_0.xml

Posted by Dave Johnson <da...@rollerweblogger.org>.
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