Hi Robert-
Robert Van Overmeiren schrieb:
Having run Magnolia 1.1 (with Tomcat 4.0), 2.0, 2.1 RC2, 2.1 RC3 (with
Tomcat 5.0) on Linux, 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 did some tests with JDBCRealm and Direct JDBC lookups using scriptlets
in 1.1, then others with DataSourceRealm and JNDI named JDBC datasource
lookups using SQL taglibs in 2.0. With 2.1, I'm using the single Tomcat,
and the clean/minimal server.xml and find that while the JDBCRealm or
DataSourceRealm element's can go in either server.xml (for all webapps)
or context(webappname).xml (only this webapp), the placement and type of
Resource element for JDBC DataSources has some variations.
With 2.0, I had the JDBC DataSource 'Resource' and 'ResourceParams'
under 'Global Resources', 'DataSourceRealm' under 'Engine', and
'ResourceLink' under 'Context' - all in server.xml. I could authenticate
against the DataSource via 'DataSourceRealm', or query the DataSource
via 'ResourceLink'.
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?
In JSTL1.1, which needs to be used with Tomcat 5.x, the JSTL & SQL
taglibs appear to be combined into one JAR - jslt-1.1.2.jar, so on my
clean Tomcat 5.5, I needed to drop the JSTL JAR into the ../WEB-INF/lib/
directory of the webapp I'm using the SQL taglib to query the JNDI named
JDBC DataSource.
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?
<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html>
<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html>
The latter has several examples on how to setup various databases.
HTH,
-markus
How can I make authentication work when the Resource (and
DataSourceRealm) is in context config (rather than server config)?
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------