>I happened to have Tomcat 5.5.10 with JVM 
>1.5.0_04 running on XP so I dropped the 2 Magnolia 2.1 RC4 WAR's in 
>webapps. They deployed OK, but it took a while for tomcat to unpak 
>those WAR's. I'm not sure if it should run on this newer JVM?
> 
>
Hm, I'm running it on my dev box with this config. No problems so far.
Magnolia goes through a bootstrap process on deployment where it imports
the repository content onto the repositories. This takes some time, as
well as quite a bit of memory. The Tomcat bundled version of magnolia
sets max heap of the JVM to 512MB, if I remember it correctly.


I understand it takes time to setup from the WAR's. I didn't know anyone
had run Magnolia 2.1 on Tomcat 5.5 so thought someone might find that
encouraging.


>With 2.1, and the single Tomcat, I find that if I want to query a JNDI 
>DataSource, I have to place the 'Resource' and 'ResourceParams' 
>elements in '../conf/Catalina/localhost/[webappname].xml'. If I place 
>the element in server.xml, it fails to resolve the DataSource Name. I 
>can't authenticate and do queries using the same element. I have to use

>two elements with two different names. You're supposed to add a 
>'resource-ref' element to 'web.xml', but I find it adds no benefit.
>
>With Tomcat 5.5, I again find that to authenticate via DataSourceRealm,

>the Resource needs to be in sever.xml, but to do queries, it needs to 
>be in [webappname].xml. The new Tomcat seems to require  the new style 
>'Resource' element. The one without the 'ResourceParams' element, but 
>has them all as properties of the 'Resource' element. This condensed 
>element has no 'factory', so no DBase Connection Pool classpath, so I'm

>not sure if this new style object is a connection pool or not?
>
>How can I make queries work when the Resource is in server config 
>(rather than context config)?
>
Hm, this sounds more like a Tomcat issue.
Did you look into the JNDI and JDBC tutorials for Tomcat?


The 5.5 JNDI datasource doc does say to use the condensed Resource
element, with no factory or ResourceParams, so I guess those are still
connection pools. It says to put the Resource within the Context in
server.xml, but my webapp contexts are in
'/conf/Catalina/localhost/[webappname].xml'. The Resource works from
here, but my Realms only work with Resources defined in server.xml
Global Resources. With Tomcat 5.0, I use the old style
Resource/ResourceParams element in [webappname].xml.


My real issue is how to get a Realm to utilize a DataSource defined in
[webappname].xml (which is opposite of what I asked)?  Maybe the 'auth'
or 'scope' params need to be something?

I know this is a lot of Tomcat, but I suspect others need to setup a
DataSource to use with their Magnolia site. I've spent more time than I
would have liked trying top get Realms and Resources running on Tomcat
4.x, 5.0 & 5.5, so thought someone might find this of some interest.



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to