From user-return-1064-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Fri Nov 04 07:23:25 2005 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 88971 invoked from network); 4 Nov 2005 07:23:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Nov 2005 07:23:24 -0000 Received: (qmail 87824 invoked by uid 500); 4 Nov 2005 07:23:20 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 87779 invoked by uid 500); 4 Nov 2005 07:23:20 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 87749 invoked by uid 99); 4 Nov 2005 07:23:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 23:23:19 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of norwaywoods@gmail.com designates 66.249.82.199 as permitted sender) Received: from [66.249.82.199] (HELO xproxy.gmail.com) (66.249.82.199) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 23:23:14 -0800 Received: by xproxy.gmail.com with SMTP id s9so736262wxc for ; Thu, 03 Nov 2005 23:22:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eecGq3kHcLdB+GG+Tv2ZClseeImISh5sw4ovae/pq5bhqBLR8jKgl2YAMyV2+LOgYz1TH1SUw+uvpDvRHEHLUrLT+kXUVglN2BBkx6gt18TTRCYqtBOLFiKEjm2xtiHcixuYDZOHeSMrZYTAZwnyGim9fouy3AP3CCnaNTEIB0A= Received: by 10.70.67.8 with SMTP id p8mr1666697wxa; Thu, 03 Nov 2005 23:22:58 -0800 (PST) Received: by 10.70.65.18 with HTTP; Thu, 3 Nov 2005 23:22:58 -0800 (PST) Message-ID: Date: Fri, 4 Nov 2005 15:22:58 +0800 From: Jian Liao To: user@geronimo.apache.org Subject: Re: Why naming service is not available when Servlet is initializing?(Tomcat 5.5.9) In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22126_14446117.1131088978204" References: <7b3355cb0511032228q7d2f7b70k76230634469e2c93@mail.gmail.com> <3f869fe297e5bfb89ae46fe06be51af1@yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_22126_14446117.1131088978204 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi david, I did use the svn head and following are my web.xml in "jetspeed/WEB-INF/" which is about jndi data source. ...... DB Connection jdbc/jetspeed javax.sql.DataSource Container ...... - James Liao On 11/4/05, Jian Liao 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: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Doracle-pla= n.xml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > configId=3D"OracleDatabase" parentId=3D"org/apache/geronimo/Server"> > > oracle/jars/classes12-10gr2.jar > > > > > javax.sql.DataSource > > > OracleDataSource > name=3D"UserName">JETSPEED2_PRODUCTION > name=3D"Password">PRODUCTION > oracle.jdbc.driver.OracleDriver > > > jdbc:oracle:thin:@pek-wkst116:1521:orcl > name=3D"CommitBeforeAutocommit">false > > org.tranql.connector.NoExceptionsAreFatalSorter > > > > 100 > 0 > 10000 > 30 > > > > > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dgeronimo-application.x= ml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > configId=3D"OracleDatabase" parentId=3D"org/apache/geronimo/Server"> > > oracle/jars/classes12-10gr2.jar > > > > > javax.sql.DataSource > > > OracleDataSource > name=3D"UserName">JETSPEED2_PRODUCTION > name=3D"Password">PRODUCTION > oracle.jdbc.driver.OracleDriver > > > jdbc:oracle:thin:@pek-wkst116:1521:orcl > name=3D"CommitBeforeAutocommit">false > > org.tranql.connector.NoExceptionsAreFatalSorter > > > > 100 > 0 > 10000 > 30 > > > > > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dgeronimo-web.xml=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > configId=3D"org/apache/jetspeed" parentId=3D"OracleDatabase"> > true > > jdbc/jetspeed > OracleDataSource > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dapplication.x= ml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > xmlns=3D"http://java.sun.com/xml/ns/j2ee" > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" > version=3D"1.4"> > > > jetspeed.war > /jetspeed > > > > tranql-connector-1.0-SNAPSHOT.rar > > > > > -James Liao > > > On 11/4/05, David Jencks 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 =3D true by default. I saw that Geronimo disable it in > > > TomcatContainer.doStart() with embedded.setUseNaming(false). > > > > > > - James Liao > > > > > > On 11/4/05, Jian Liao 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=3D6-E+G-N>61E > >>> );' > > >>> > > >>> The Castor Project > > >>> http://www.castor.org/ > > >>> > > >>> Apache Geronimo > > >>> http://geronimo.apache.org/ > > >> > > > > > ------=_Part_22126_14446117.1131088978204 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi david,
I did use the svn head and following are my web.xml in "jetspeed/WEB-I= NF/" which is about jndi data source.
......
<!-- JNDI Db resource -->
<resource-ref>
      <description>DB Connection</descrip= tion>
      <res-ref-name>jdbc/jetspeed</res-re= f-name>
      <res-type>javax.sql.DataSource</res= -type>
      <res-auth>Container</res-auth> </resource-ref>
......

- James Liao

On 11/4/05, Jian Liao <norwaywoo= ds@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
            &nb= sp;
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:
 
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Doracle-plan.= xml=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
<?xml version=3D"1.0"?>
<connector xmlns=3D"http://geronimo.apache.org/xml/ns/j2ee/connector" configId=3D"OracleDatabase" parentId=3D"org/apache/geronimo/= Server">
    <dependency>
        <uri>oracle/jars/classes12-10gr= 2.jar</uri>
    </dependency>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-def= inition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfacto= ry-interface>
               = <connectiondefinition-instance>
                    <name>OracleDataSource</name>
                    <config-property-setting name=3D"UserName">JETSPEED2_PRODUCTION</config-property-set= ting>
                    <config-property-setting name=3D"Password">PRODUCTION</config-property-setting>                     <config-property-setting name=3D"Driver">oracle.jdbc.driver.OracleDriver</config-pro= perty-setting>
                    <config-property-setting name=3D"ConnectionURL">jdbc:oracle:thin:@pek-wkst116:1521:orcl= </config-property-setting>
                    <config-property-setting name=3D"CommitBeforeAutocommit">false</config-property-sett= ing>
                    <config-property-setting name=3D"ExceptionSorterClass">org.tranql.connector.NoException= sAreFatalSorter</config-property-setting>
               =     <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>100</max-size>
                            <min-size>0</min-size>
                            <blocking-timeout-milliseconds>10000</blocking-timeout-millisecond= s>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>                   
               = </connectiondefinition-instance>
            </connection-de= finition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dgeronimo-application.xml= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <?xml version=3D"1.0"?>
<connector xmlns=3D"http://geronimo.apache.org/xml/ns/j2ee/connector" configId=3D"OracleDatabase" parentId=3D"org/apache/geronimo/= Server">
    <dependency>
        <uri>oracle/jars/classes12-10gr= 2.jar</uri>
    </dependency>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-def= inition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfacto= ry-interface>
               = <connectiondefinition-instance>
                    <name>OracleDataSource</name>
                    <config-property-setting name=3D"UserName">JETSPEED2_PRODUCTION</config-property-set= ting>
                    <config-property-setting name=3D"Password">PRODUCTION</config-property-setting>                     <config-property-setting name=3D"Driver">oracle.jdbc.driver.OracleDriver</config-pro= perty-setting>
                    <config-property-setting name=3D"ConnectionURL">jdbc:oracle:thin:@pek-wkst116:1521:orcl= </config-property-setting>
                    <config-property-setting name=3D"CommitBeforeAutocommit">false</config-property-sett= ing>
                    <config-property-setting name=3D"ExceptionSorterClass">org.tranql.connector.NoException= sAreFatalSorter</config-property-setting>
               =     <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>100</max-size>
                            <min-size>0</min-size>
                            <blocking-timeout-milliseconds>10000</blocking-timeout-millisecond= s>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>                   
               = </connectiondefinition-instance>
            </connection-de= finition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dgeronimo-web.xml=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<?xml version=3D"1.0"?>
<web-app xmlns=3D"http://geronimo.apache.org/xml/ns/web" configId=3D"org/apache/jetspeed" parentId=3D"OracleDatabase">   
    <context-priority-classloader>true</context-pri= ority-classloader>
    <resource-ref>
        <ref-name>jdbc/jetspeed<= ;/ref-name>
        <resource-link>OracleDataS= ource</resource-link>
    </resource-ref>   
</web-app>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dapplication.xml= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <application
       xmlns=3D"http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance= "
       xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee
       http://java.sun.com/xml/ns/j2ee/application_1_= 4.xsd"
       version=3D"1.4"> &nb= sp; 
    <module>
        <web>
            <web-= uri>jetspeed.war</web-uri>
            <cont= ext-root>/jetspeed</context-root>
        </web>
    </module>
    <module>
        <connector>tranql-connecto= r-1.0-SNAPSHOT.rar</connector>
    </module>
</application>


-James Liao



On 11/4/05, David Jencks <davi= d_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<= br>datasource "named" jdbc/jetspeed or map it to whatever the dat= asource
is named.

If you are deploying the datasource in the same plan a= s j2 (I recommend
doing this) you need to use geronimo head because the = appropriate
dependencies to force the correct start order were only adde= d last
week.

If you are still having problems please show us your geron= imo plan.

thanks
david jencks

On Nov 3, 2005, at 10:35 PM,= Jian Liao wrote:

> Sorry, I forgot to tell Jetspeed 2 work perfe= ctly with tomcat=20 5.5.9
> standalone. Because Tomcat5.5.9 use its own naming services w= ith
> useNaming =3D true by default. I saw that Geronimo disable it i= n
> 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 <=20 bruce.snyder@gmail.com>>> wrote:norwaywoods@gmail.com> wrote:
>>> > All,
>= ;>> >I'm trying to integrate jetspeed 2 with geronimo(svn head) an= d
>>> tomcat-5.5.9
>>> > as web container.
>= ;>> >The deployment is successful. But Jetspeed will initialize OJ= B in
>>> > JetspeedServlet.init() method which needs to obta= in resource
>>> jdbc/jetspeed
>>> > through JNDI. It just c= an not get it cause the context is never
>>> bind to the
>= ;>> > thread.
>>> >
>>> >I try it wi= th Jetty and it works because
>>> ComponentContextBeforeAfter is
>>> > called= .
>>> >
>>> >I am wondering if I am not allow= ed to do any JNDI operation in
>>> > Servlet.init ()?
>>>
>>> Have you tried this in Tomcat running standalo= ne? When you tried it
>>> with Jetty, was Jetty running standal= one or within Geronimo?
>>>
>>> Bruce
>>&g= t; --
>>> perl -e 'print
>>> unpack("u30",&quo= t;D0G)U8V4\@4VYY9&5R\"F)R=3D6-E+G-N>61E<D\!G;6%I;\"YC;V= T*"
>>> );'
>>>
>>> The Castor Pro= ject
>>> http://www.castor.org/<= /a>
>>>
>>> Apache Geronimo
>>> &n= bsp;
http://geronimo.apache.org/
>>



------=_Part_22126_14446117.1131088978204--