geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jian Liao <norwaywo...@gmail.com>
Subject Re: Why naming service is not available when Servlet is initializing?(Tomcat 5.5.9)
Date Fri, 04 Nov 2005 07:22:58 GMT
Hi david,
I did use the svn head and following are my web.xml in "jetspeed/WEB-INF/"
which is about jndi data source.
......
<!-- JNDI Db resource -->
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/jetspeed</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
......

- James Liao

On 11/4/05, Jian Liao <norwaywoods@gmail.com> wrote:
>
> Thanks for respond.
> The directory structural:
>
> jetspeed.ear
> |
> |------META-INF
> | |-----------geronimo-application.xml
> | |-----------application.xml
> |
> |------tranql-connector-1.0-SNAPSHOT.rar
> |------oracle-plan.xml
> |------jetspeed.war
>
> jetspeed.war
> |
> |
> |------WEB-INF
> |----------web.xml
> |----------geronimo-web.xml
> (.......)
>
> I've replaced config.xml with config.tomcat.xml.
>
> The following are all of my plans:
>
> =====================oracle-plan.xml=============================
> <?xml version="1.0"?>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
> configId="OracleDatabase" parentId="org/apache/geronimo/Server">
> <dependency>
> <uri>oracle/jars/classes12-10gr2.jar</uri>
> </dependency>
> <resourceadapter>
> <outbound-resourceadapter>
> <connection-definition>
> <connectionfactory-interface>javax.sql.DataSource
> </connectionfactory-interface>
> <connectiondefinition-instance>
> <name>OracleDataSource</name>
> <config-property-setting
> name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
> <config-property-setting
> name="Password">PRODUCTION</config-property-setting>
> <config-property-setting name="Driver">oracle.jdbc.driver.OracleDriver
> </config-property-setting>
> <config-property-setting name="ConnectionURL">
> jdbc:oracle:thin:@pek-wkst116:1521:orcl</config-property-setting>
> <config-property-setting
> name="CommitBeforeAutocommit">false</config-property-setting>
> <config-property-setting name="ExceptionSorterClass">
> org.tranql.connector.NoExceptionsAreFatalSorter</config-property-setting>
> <connectionmanager>
> <local-transaction/>
> <single-pool>
> <max-size>100</max-size>
> <min-size>0</min-size>
> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
> <idle-timeout-minutes>30</idle-timeout-minutes>
> <match-one/>
> </single-pool>
> </connectionmanager>
> </connectiondefinition-instance>
> </connection-definition>
> </outbound-resourceadapter>
> </resourceadapter>
> </connector>
>
> =================geronimo-application.xml========================
> <?xml version="1.0"?>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
> configId="OracleDatabase" parentId="org/apache/geronimo/Server">
> <dependency>
> <uri>oracle/jars/classes12-10gr2.jar</uri>
> </dependency>
> <resourceadapter>
> <outbound-resourceadapter>
> <connection-definition>
> <connectionfactory-interface>javax.sql.DataSource
> </connectionfactory-interface>
> <connectiondefinition-instance>
> <name>OracleDataSource</name>
> <config-property-setting
> name="UserName">JETSPEED2_PRODUCTION</config-property-setting>
> <config-property-setting
> name="Password">PRODUCTION</config-property-setting>
> <config-property-setting name="Driver">oracle.jdbc.driver.OracleDriver
> </config-property-setting>
> <config-property-setting name="ConnectionURL">
> jdbc:oracle:thin:@pek-wkst116:1521:orcl</config-property-setting>
> <config-property-setting
> name="CommitBeforeAutocommit">false</config-property-setting>
> <config-property-setting name="ExceptionSorterClass">
> org.tranql.connector.NoExceptionsAreFatalSorter</config-property-setting>
> <connectionmanager>
> <local-transaction/>
> <single-pool>
> <max-size>100</max-size>
> <min-size>0</min-size>
> <blocking-timeout-milliseconds>10000</blocking-timeout-milliseconds>
> <idle-timeout-minutes>30</idle-timeout-minutes>
> <match-one/>
> </single-pool>
> </connectionmanager>
> </connectiondefinition-instance>
> </connection-definition>
> </outbound-resourceadapter>
> </resourceadapter>
> </connector>
>
> ==================geronimo-web.xml========================
> <?xml version="1.0"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
> configId="org/apache/jetspeed" parentId="OracleDatabase">
> <context-priority-classloader>true</context-priority-classloader>
> <resource-ref>
> <ref-name>jdbc/jetspeed</ref-name>
> <resource-link>OracleDataSource</resource-link>
> </resource-ref>
> </web-app>
>
> ====================application.xml========================
> <application
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"<http://java.sun.com/xml/ns/j2ee/application_1_4.xsd%22>
> version="1.4">
> <module>
> <web>
> <web-uri>jetspeed.war</web-uri>
> <context-root>/jetspeed</context-root>
> </web>
> </module>
> <module>
> <connector>tranql-connector-1.0-SNAPSHOT.rar</connector>
> </module>
> </application>
>
>
> -James Liao
>
>
> On 11/4/05, David Jencks <david_jencks@yahoo.com> wrote:
> >
> > How are you setting up the datasource for j2 to use? You need to look
> > up something like java:comp/env/jdbc/jetspeed and either deploy a
> > datasource "named" jdbc/jetspeed or map it to whatever the datasource
> > is named.
> >
> > If you are deploying the datasource in the same plan as j2 (I recommend
> > doing this) you need to use geronimo head because the appropriate
> > dependencies to force the correct start order were only added last
> > week.
> >
> > If you are still having problems please show us your geronimo plan.
> >
> > thanks
> > david jencks
> >
> > On Nov 3, 2005, at 10:35 PM, Jian Liao wrote:
> >
> > > Sorry, I forgot to tell Jetspeed 2 work perfectly with tomcat 5.5.9
> > > standalone. Because Tomcat5.5.9 use its own naming services with
> > > useNaming = true by default. I saw that Geronimo disable it in
> > > TomcatContainer.doStart() with embedded.setUseNaming(false).
> > >
> > > - James Liao
> > >
> > > On 11/4/05, Jian Liao <norwaywoods@gmail.com> wrote:
> > >>
> > >> - James Liao
> > >>
> > >>
> > >> On 11/4/05, Bruce Snyder < bruce.snyder@gmail.com>
> > >> wrote:norwaywoods@gmail.com> wrote:
> > >>> > All,
> > >>> >I'm trying to integrate jetspeed 2 with geronimo(svn head) and
> > >>> tomcat-5.5.9
> > >>> > as web container.
> > >>> >The deployment is successful. But Jetspeed will initialize OJB
in
> > >>> > JetspeedServlet.init() method which needs to obtain resource
> > >>> jdbc/jetspeed
> > >>> > through JNDI. It just can not get it cause the context is never
> > >>> bind to the
> > >>> > thread.
> > >>> >
> > >>> >I try it with Jetty and it works because
> > >>> ComponentContextBeforeAfter is
> > >>> > called.
> > >>> >
> > >>> >I am wondering if I am not allowed to do any JNDI operation in
> > >>> > Servlet.init ()?
> > >>>
> > >>> Have you tried this in Tomcat running standalone? When you tried it
> > >>> with Jetty, was Jetty running standalone or within Geronimo?
> > >>>
> > >>> Bruce
> > >>> --
> > >>> perl -e 'print
> > >>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> > >>> );'
> > >>>
> > >>> The Castor Project
> > >>> http://www.castor.org/
> > >>>
> > >>> Apache Geronimo
> > >>> http://geronimo.apache.org/
> > >>
> >
> >
>

Mime
View raw message