You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nmall <ha...@gmail.com> on 2007/06/26 18:53:08 UTC

Jetty JNDI configuration with maven plugin

Hi,

 The following configuration for setting up a JNDI JDBC datasource for a
J2EE app works on Linux but does not work on Windows XP.  Any idea if I need
to set up anything more on Windows. Thanks for your help!!

We are using Spring to configure our hibernate resources. The Spring bean is
configured as below.

 <bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="jdbc/SADS"/>
      <property name="resourceRef" value="true" />

jetty-env.xml:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">

<New id="SADS" class="org.mortbay.jetty.plus.naming.Resource">
    <Arg>jdbc/SADS</Arg>
    <Arg>
     <New
class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                 <Set name="Url">jdbc:mysql://galaxy/myDB</Set>
                 <Set name="User">user</Set>
                 <Set name="Password">password</Set>
     </New>
    </Arg>
   </New>
</Configure>

    </bean>

Definition of the JNDI resource in web.xml:

<resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/SADS</res-ref-name>
      <res-type> javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>

Thanks!!


-- 
View this message in context: http://www.nabble.com/Jetty-JNDI-configuration-with-maven-plugin-tf3983535s177.html#a11309509
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jetty JNDI configuration with maven plugin

Posted by Wayne Fay <wa...@gmail.com>.
And this has to do with Maven how...?

Wayne

On 6/26/07, nmall <ha...@gmail.com> wrote:
>
> Hi,
>
>  The following configuration for setting up a JNDI JDBC datasource for a
> J2EE app works on Linux but does not work on Windows XP.  Any idea if I need
> to set up anything more on Windows. Thanks for your help!!
>
> We are using Spring to configure our hibernate resources. The Spring bean is
> configured as below.
>
>  <bean id="dataSource"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>      <property name="jndiName" value="jdbc/SADS"/>
>      <property name="resourceRef" value="true" />
>
> jetty-env.xml:
>
> <?xml version="1.0"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
> "http://jetty.mortbay.org/configure.dtd">
>
> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>
> <New id="SADS" class="org.mortbay.jetty.plus.naming.Resource">
>    <Arg>jdbc/SADS</Arg>
>    <Arg>
>     <New
> class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
>                 <Set name="Url">jdbc:mysql://galaxy/myDB</Set>
>                 <Set name="User">user</Set>
>                 <Set name="Password">password</Set>
>     </New>
>    </Arg>
>   </New>
> </Configure>
>
>    </bean>
>
> Definition of the JNDI resource in web.xml:
>
> <resource-ref>
>      <description>DB Connection</description>
>      <res-ref-name>jdbc/SADS</res-ref-name>
>      <res-type> javax.sql.DataSource</res-type>
>      <res-auth>Container</res-auth>
>    </resource-ref>
>
> Thanks!!
>
>
> --
> View this message in context: http://www.nabble.com/Jetty-JNDI-configuration-with-maven-plugin-tf3983535s177.html#a11309509
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org