On Mon, Apr 29, 2013 at 11:33 PM, George Christman
<gchrist...@cardaddy.com>wrote:

> So as it turns out, the issue was caused by tapestry-test adding an older
> tomcat files to the class path. I'll need to somehow figure out how to
> exclude them from the class path.
>
>        <dependency>
>             <groupId>org.apache.tapestry</groupId>
>             <artifactId>tapestry-test</artifactId>
>             <version>5.3.6</version>
>             <exclusions>
>                 <exclusion></exclusion>
>             </exclusions>
>         </dependency>
>
>
Just add <scope>test</scope> here, no need to use exclusions here. You
don't need tapestry-test for runtime classpath.


> The other question I have has to do with my hibernate.cfg.xml file. I use
> to use something like this to establish my database connection with jetty
> using jetty-env.xml
>
> <property
> name="hibernate.connection.datasource">jdbc/rolemanager</property>
>
> <Configure id='wac' class="org.mortbay.jetty.webapp.WebAppContext">
>   <New id="LocalDS" class="org.mortbay.jetty.plus.naming.Resource">
>     <Arg>jdbc/rolemanager</Arg>
>     <Arg>
>     <New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
>             <Set name="ServerName">localhost</Set>
>             <Set name="PortNumber">3306</Set>
>             <Set name="DatabaseName">rolemanager</Set>
>             <Set name="User">root</Set>
>             <Set name="Password">test</Set>
>         </New>
>     </Arg>
>   </New>
> </Configure>
>
> but with tomcat I need to use something like this,
>
> <property
>
> name="hibernate.connection.datasource">java:comp/env/jdbc/rolemanager</property>
>
>
You can use "jdbc/rolemanager" for tomcat also.

I use hibernate with JPA, and here's what I have in my persistence.xml:

    <persistence-unit name="projectX-pu" transaction-type="RESOURCE_LOCAL">

        <provider>org.hibernate.ejb.HibernatePersistence</provider>

        <non-jta-data-source>jdbc/projectX-db</non-jta-data-source>

 Then in my web.xml:

    <resource-ref>

        <description>DB Reference</description>

        <res-ref-name>jdbc/projectX-db</res-ref-name>

        <res-type>javax.sql.DataSource</res-type>

        <res-auth>Container</res-auth>

    </resource-ref>

</web-app>

And in my context definition:

<Resource name="jdbc/projectX-db"
        type="javax.sql.DataSource"
        auth="Container"
        maxActive="100" maxIdle="30" maxWait="10000"
        driverClassName="org.postgresql.Driver"
        url="jdbc:postgresql://localhost/projectX"
        username="dmitrygusev" />


> I'm not sure how get this to dynamically work for both servers.
>
> Thanks for all the help everyone.
>
>
> On Mon, Apr 29, 2013 at 2:41 PM, Lenny Primak <lpri...@hope.nyc.ny.us
> >wrote:
>
> > Netbeans runs just under plane maven, just like from the command line.
> > There maybe stale files in WEB-INF/lib, but if you run mvn clean, they
> > will be gone.
> >
> > <exclusions> maven directive is your friend here
> >
> > On Apr 29, 2013, at 2:38 PM, Dmitry Gusev wrote:
> >
> > > They will be present in classpath if you won't exclude them.
> > > I'm not familiar with Netbeans, but in Eclipse Sysdeo Plugin I have to
> > > manually remove them,
> > > so you should check your runtime classpath.
> > >
> > > You can also try to build a war and look at WEB-INF/lib folder to check
> > if
> > > these files not there.
> > >
> > > On Mon, Apr 29, 2013 at 10:25 PM, George Christman
> > > <gchrist...@cardaddy.com>wrote:
> > >
> > >> I was wondering the same thing about those files, but as you said they
> > >> shouldn't.
> > >>
> > >>
> > >> On Mon, Apr 29, 2013 at 2:23 PM, George Christman
> > >> <gchrist...@cardaddy.com>wrote:
> > >>
> > >>> I run my project from Netbeans, locally with jetty, and deployed as a
> > >> war.
> > >>>
> > >>>
> > >>> On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev <
> dmitry.gu...@gmail.com
> > >>> wrote:
> > >>>
> > >>>> How do you run your project? Is it from within eclipse? Or you're
> > >>>> deploying
> > >>>> a *.war file?
> > >>>>
> > >>>> Could it be that these files getting into classpath?
> > >>>>
> > >>>> [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile
> > >>>> ...
> > >>>> [INFO] |  +- org.apache.tomcat:dbcp:jar:6.0.30:compile
> > >>>> [INFO] |  +- org.apache.tomcat:coyote:jar:6.0.30:compile
> > >>>> [INFO] |  |  +- org.apache.tomcat:servlet-api:jar:6.0.30:compile
> > >>>> [INFO] |  |  \- org.apache.tomcat:juli:jar:6.0.30:compile
> > >>>> [INFO] |  \- org.apache.tomcat:catalina:jar:6.0.30:compile
> > >>>> [INFO] |     \- org.apache.tomcat:annotations-api:jar:6.0.30:compile
> > >>>>
> > >>>> They shouldn't, as well as any transitive dependencies
> > >>>> of org.apache.tapestry:tapestry-test
> > >>>>
> > >>>>
> > >>>> On Mon, Apr 29, 2013 at 10:10 PM, George Christman
> > >>>> <gchrist...@cardaddy.com>wrote:
> > >>>>
> > >>>>> Here's my mvn dependency tree, thanks for your help.
> > >>>>>
> > >>>>> [WARNING] Failed to retrieve plugin descriptor for
> > >>>>> org.codehaus.mojo:hibernate3-
> > >>>>> maven-plugin:2.2: Failed to parse plugin descriptor for
> > >>>>> org.codehaus.mojo:hibern
> > >>>>> ate3-maven-plugin:2.2
> > >>>>> (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate
> > >>>>> 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in
> opening
> > >>>> zip
> > >>>>> file
> > >>>>> [INFO]
> > >>>>> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @
> > >> RoleManager
> > >>>> ---
> > >>>>> [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT
> > >>>>> [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile
> > >>>>> [INFO] |  +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile
> > >>>>> [INFO] |  +- org.antlr:antlr-runtime:jar:3.3:compile
> > >>>>> [INFO] |  |  \- org.antlr:stringtemplate:jar:3.2.1:compile
> > >>>>> [INFO] |  +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile
> > >>>>> [INFO] |  |  +-
> > >>>> org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile
> > >>>>> [INFO] |  |  +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile
> > >>>>> [INFO] |  |  +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
> > >>>>> [INFO] |  |  +- javax.inject:javax.inject:jar:1:compile
> > >>>>> [INFO] |  |  +- org.apache.tapestry:plastic:jar:5.3.6:compile
> > >>>>> [INFO] |  |  +- log4j:log4j:jar:1.2.14:compile
> > >>>>> [INFO] |  |  \- javassist:javassist:jar:3.12.1.GA:compile
> > >>>>> [INFO] |  \- commons-codec:commons-codec:jar:1.5:compile
> > >>>>> [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile
> > >>>>> [INFO] |  +-
> > >> org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile
> > >>>>> [INFO] |  |  +- bouncycastle:bcprov-jdk15:jar:135:compile
> > >>>>> [INFO] |  |  +- mx4j:mx4j-tools:jar:3.0.1:compile
> > >>>>> [INFO] |  |  +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile
> > >>>>> [INFO] |  |  +- net.jcip:jcip-annotations:jar:1.0:compile
> > >>>>> [INFO] |  |  \- org.yaml:snakeyaml:jar:1.8:compile
> > >>>>> [INFO] |  +-
> org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  \-
> > >>>>> org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil
> > >>>>> e
> > >>>>> [INFO] |  +-
> org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi
> > >>>>> le
> > >>>>> [INFO] |  |  |  \-
> > >>>>> org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com
> > >>>>> pile
> > >>>>> [INFO] |  |  |     +- org.json:json:jar:20080701:compile
> > >>>>> [INFO] |  |  |     \- com.google.guava:guava:jar:10.0.1:compile
> > >>>>> [INFO] |  |  |        \-
> > >>>> com.google.code.findbugs:jsr305:jar:1.3.9:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil
> > >>>>> e
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp
> > >>>>> ile
> > >>>>> [INFO] |  |  |  +-
> > >>>> org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile
> > >>>>> [INFO] |  |  |  +-
> net.sourceforge.htmlunit:htmlunit:jar:2.9:compile
> > >>>>> [INFO] |  |  |  |  +- xalan:xalan:jar:2.7.1:compile
> > >>>>> [INFO] |  |  |  |  |  \- xalan:serializer:jar:2.7.1:compile
> > >>>>> [INFO] |  |  |  |  +-
> > >>>> org.apache.httpcomponents:httpmime:jar:4.1.2:compile
> > >>>>> [INFO] |  |  |  |  +-
> > >>>>> net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile
> > >>>>> [INFO] |  |  |  |  +- xerces:xercesImpl:jar:2.9.1:compile
> > >>>>> [INFO] |  |  |  |  |  \- xml-apis:xml-apis:jar:1.3.04:compile
> > >>>>> [INFO] |  |  |  |  +-
> > >>>> net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile
> > >>>>> [INFO] |  |  |  |  \-
> > >>>> net.sourceforge.cssparser:cssparser:jar:0.9.5:compile
> > >>>>> [INFO] |  |  |  |     \- org.w3c.css:sac:jar:1.3:compile
> > >>>>> [INFO] |  |  |  \-
> > >>>> org.apache.httpcomponents:httpclient:jar:4.1.2:compile
> > >>>>> [INFO] |  |  |     \-
> > >>>> org.apache.httpcomponents:httpcore:jar:4.1.2:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi
> > >>>>> le
> > >>>>> [INFO] |  |  |  \- org.apache.commons:commons-exec:jar:1.1:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile
> > >>>>> [INFO] |  |  |  \- net.java.dev.jna:jna:jar:3.3.0:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil
> > >>>>> e
> > >>>>> [INFO] |  |  \-
> > >>>> org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile
> > >>>>> [INFO] |  +- org.testng:testng:jar:5.14.10:compile
> > >>>>> [INFO] |  |  +- org.beanshell:bsh:jar:2.0b4:compile
> > >>>>> [INFO] |  |  \- com.beust:jcommander:jar:1.12:compile
> > >>>>> [INFO] |  +-
> > >> org.eclipse.jetty:jetty-webapp:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  +-
> > >> org.eclipse.jetty:jetty-xml:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  |  \-
> > >>>> org.eclipse.jetty:jetty-util:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  \-
> > >>>> org.eclipse.jetty:jetty-servlet:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |     \-
> > >>>>> org.eclipse.jetty:jetty-security:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  +- jetty:org.mortbay.jetty:jar:5.1.12:compile
> > >>>>> [INFO] |  +-
> org.eclipse.jetty:jetty-jndi:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  \- javax.mail:mail:jar:1.4:compile
> > >>>>> [INFO] |  +- org.easymock:easymock:jar:3.0:compile
> > >>>>> [INFO] |  |  +- cglib:cglib-nodep:jar:2.2:compile
> > >>>>> [INFO] |  |  \- org.objenesis:objenesis:jar:1.2:compile
> > >>>>> [INFO] |  +-
> > >> org.eclipse.jetty:jetty-server:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |  +-
> > >>>>> org.eclipse.jetty:jetty-continuation:jar:7.0.0.v20091005:compile
> > >>>>>
> > >>>>> [INFO] |  |  \-
> > >> org.eclipse.jetty:jetty-http:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  |     \-
> > >>>> org.eclipse.jetty:jetty-io:jar:7.0.0.v20091005:compile
> > >>>>> [INFO] |  +- org.apache.tomcat:dbcp:jar:6.0.30:compile
> > >>>>> [INFO] |  +- org.apache.tomcat:coyote:jar:6.0.30:compile
> > >>>>> [INFO] |  |  +- org.apache.tomcat:servlet-api:jar:6.0.30:compile
> > >>>>> [INFO] |  |  \- org.apache.tomcat:juli:jar:6.0.30:compile
> > >>>>> [INFO] |  \- org.apache.tomcat:catalina:jar:6.0.30:compile
> > >>>>> [INFO] |     \-
> org.apache.tomcat:annotations-api:jar:6.0.30:compile
> > >>>>> [INFO] +- org.apache.tapestry:tapestry-hibernate:jar:5.3.6:compile
> > >>>>> [INFO] |  \-
> > >>>> org.apache.tapestry:tapestry-hibernate-core:jar:5.3.6:compile
> > >>>>> [INFO] |     +-
> > >>>>> org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.
> > >>>>> Final:compile
> > >>>>> [INFO] |     \- geronimo-spec:geronimo-spec-jta:jar:1.0-M1:runtime
> > >>>>> [INFO] +- junit:junit:jar:4.10:compile
> > >>>>> [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:compile
> > >>>>> [INFO] +- org.hibernate:hibernate-search:jar:3.4.2.Final:compile
> > >>>>> [INFO] |  +-
> > >>>>> org.hibernate:hibernate-search-analyzers:jar:3.4.2.Final:compile
> > >>>>> [INFO] |  |  +-
> org.apache.lucene:lucene-analyzers:jar:3.1.0:compile
> > >>>>> [INFO] |  |  \-
> > org.apache.solr:solr-analysis-extras:jar:3.1.0:compile
> > >>>>> [INFO] |  |     +- org.apache.solr:solr-core:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +- org.apache.solr:solr-solrj:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +-
> > >>>>> org.apache.lucene:lucene-highlighter:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +-
> > >> org.apache.lucene:lucene-memory:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +-
> org.apache.lucene:lucene-misc:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +-
> > >> org.apache.lucene:lucene-spatial:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  +-
> > >>>>> org.apache.lucene:lucene-spellchecker:jar:3.1.0:compile
> > >>>>> [INFO] |  |     |  \-
> > >> org.apache.solr:solr-commons-csv:jar:3.1.0:compile
> > >>>>> [INFO] |  |     +-
> org.apache.lucene:lucene-smartcn:jar:3.1.0:compile
> > >>>>> [INFO] |  |     \-
> org.apache.lucene:lucene-stempel:jar:3.1.0:compile
> > >>>>> [INFO] |  +- org.hibernate:hibernate-core:jar:3.6.10.Final:compile
> > >>>>> [INFO] |  |  +- antlr:antlr:jar:2.7.6:compile
> > >>>>> [INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
> > >>>>> [INFO] |  |  \- javax.transaction:jta:jar:1.1:compile
> > >>>>> [INFO] |  +-
> > >>>>> org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
> > >>>>>
> > >>>>> [INFO] |  +- org.apache.lucene:lucene-core:jar:3.1.0:compile
> > >>>>> [INFO] |  \- org.slf4j:slf4j-api:jar:1.6.1:compile
> > >>>>> [INFO] +- org.got5:tapestry5-jquery:jar:3.3.3:compile
> > >>>>> [INFO] |  +- org.apache.tapestry:tapestry-upload:jar:5.3.6:compile
> > >>>>> [INFO] |  |  \- commons-io:commons-io:jar:2.0.1:compile
> > >>>>> [INFO] |  +-
> commons-fileupload:commons-fileupload:jar:1.2.2:compile
> > >>>>> [INFO] |  \- commons-lang:commons-lang:jar:2.6:compile
> > >>>>> [INFO] +- javax.servlet:servlet-api:jar:2.5:provided (scope not
> > >> updated
> > >>>> to
> > >>>>> compi
> > >>>>> le)
> > >>>>> [INFO] +-
> commons-configuration:commons-configuration:jar:1.6:compile
> > >>>>> [INFO] |  +-
> > commons-collections:commons-collections:jar:3.2.1:compile
> > >>>>> [INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
> > >>>>> [INFO] |  +- commons-digester:commons-digester:jar:1.8:compile
> > >>>>> [INFO] |  \-
> > >> commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
> > >>>>> [INFO] +- mysql:mysql-connector:jar:5.1.6:compile
> > >>>>> [INFO] +- commons-validator:commons-validator:jar:1.3.1:compile
> > >>>>> [INFO] |  \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
> > >>>>> [INFO] \- oro:oro:jar:2.0.8:compile
> > >>>>> [INFO]
> > >>>>>
> > >>
> ------------------------------------------------------------------------
> > >>>>>
> > >>>>>
> > >>>>> On Mon, Apr 29, 2013 at 1:13 PM, Dmitry Gusev <
> > dmitry.gu...@gmail.com
> > >>>>>> wrote:
> > >>>>>
> > >>>>>> Lenny is right, you have some jars in your classpath that
> > >> conflicting
> > >>>>> with
> > >>>>>> tomcat's libraries.
> > >>>>>>
> > >>>>>> Can you show output of "mvn dependency:tree" or "gradle
> > >> dependencies"
> > >>>> ?
> > >>>>>>
> > >>>>>> On Mon, Apr 29, 2013 at 9:04 PM, Lenny Primak <
> > >> lpri...@hope.nyc.ny.us
> > >>>>>>> wrote:
> > >>>>>>
> > >>>>>>> Sounds like you are mixing up your dependencies.  Perhaps an
> > >>>>> incompatible
> > >>>>>>> or duplicated version
> > >>>>>>> of some JARs somewhere.  Sorry I can't be anymore specific.
> > >>>>>>>
> > >>>>>>> On Apr 29, 2013, at 1:00 PM, George Christman wrote:
> > >>>>>>>
> > >>>>>>>> Hi everyone, I'm now getting back to this issue and I'd like to
> > >>>> say I
> > >>>>>>>> honestly still don't understand it. I posted my config on stack
> > >>>>>> overflow
> > >>>>>>>> with a little more detail. If any tapestry tomcat users would
> > >>>> like to
> > >>>>>>> take
> > >>>>>>>> a look at it and tell me what I might be doing wrong, I'd
> > >>>> appreciate
> > >>>>>> it.
> > >>>>>>>> Thanks
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>
> > >>>>>>
> > >>>>>
> > >>>>
> > >>
> >
> http://stackoverflow.com/questions/16284005/how-to-configure-tapestry5-hibernate-tomcat7-jndi-mysql
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> On Tue, Mar 26, 2013 at 7:54 AM, Dmitry Gusev <
> > >>>>> dmitry.gu...@gmail.com
> > >>>>>>>> wrote:
> > >>>>>>>>
> > >>>>>>>>> I don't like to use server.xml for JNDI configuration for
> > >> several
> > >>>>>>> reasons,
> > >>>>>>>>> but the main is that JDBC driver classes should be on server
> > >>>>>> classpath,
> > >>>>>>>>> which means you have to manually put them there.
> > >>>>>>>>> Which personally I don't like because driver jar usually
> > >>>> specified
> > >>>>> at
> > >>>>>>>>> pom.xml/build.gradle and this is simply not that DRY.
> > >>>>>>>>>
> > >>>>>>>>> And also this is not recommended by tomcat team and here's why:
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>
> > >>>>>>
> > >>>>>
> > >>>>
> > >>
> >
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context
> > >>>>>>>>>
> > >>>>>>>>> What I prefer to do is to create context file (ROOT context at
> > >>>> this
> > >>>>>>>>> example) at
> > >>>> ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml
> > >>>>>> with
> > >>>>>>>>> the following content:
> > >>>>>>>>>
> > >>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
> > >>>>>>>>> <Context>
> > >>>>>>>>>   <Loader delegate="true"/>
> > >>>>>>>>>
> > >>>>>>>>>   <Resource name="jdbc/xxx-db"
> > >>>>>>>>>       type="javax.sql.DataSource"
> > >>>>>>>>>       auth="Container"
> > >>>>>>>>>       maxActive="100" maxIdle="30" maxWait="10000"
> > >>>>>>>>>       driverClassName="org.postgresql.Driver"
> > >>>>>>>>>       url="jdbc:postgresql://localhost/xxx"
> > >>>>>>>>>       username="xxx" />
> > >>>>>>>>>
> > >>>>>>>>> </Context>
> > >>>>>>>>>
> > >>>>>>>>> For several recent projects I found it convenient to also
> > >> develop
> > >>>>> with
> > >>>>>>>>> Tomcat using Sysdeo Eclipse Plugin.
> > >>>>>>>>> For this to work there I have to put content of /Context node
> > >>>> into
> > >>>>>>> "Extra
> > >>>>>>>>> information" textarea at Project Properties -> Tomcat.
> > >>>>>>>>>
> > >>>>>>>>> Though, I agree its more difficult to setup Tomcat plugin than
> > >>>> Jetty
> > >>>>>> in
> > >>>>>>>>> Eclipse, but when you did this once -- every other projects
> > >> will
> > >>>> be
> > >>>>>>> easier
> > >>>>>>>>> to setup. And you usually might want to have exactly the same
> > >> web
> > >>>>>>> container
> > >>>>>>>>> that will be in production if you use, say, web sockets API.
> > >>>>>>>>>
> > >>>>>>>>> // PS: Sorry for offtopic
> > >>>>>>>>>
> > >>>>>>>>> On Tue, Mar 26, 2013 at 3:28 PM, Barry Books <trs...@gmail.com
> > >>>
> > >>>>>> wrote:
> > >>>>>>>>>
> > >>>>>>>>>> I also host on Amazon with Tomcat and develop with Jetty.
> > >>>>>>>>>>
> > >>>>>>>>>> Hibernate just gets the datasource from the container. When
> > >>>> running
> > >>>>>>>>>> locally that's Jetty and Jetty reads the jetty-web.xml file to
> > >>>>> build
> > >>>>>>>>>> the connection. When deployed under Tomcat that would most
> > >>>> likely
> > >>>>> be
> > >>>>>>>>>> the server.xml file in the Tomcat conf directory. Tomcat
> > >>>> requires a
> > >>>>>>>>>> mapping between the server.xml configurations and each web
> > >> app.
> > >>>> I
> > >>>>> do
> > >>>>>>>>>> this by creating a META-INF/context.xml file in the project.
> > >>>> When
> > >>>>>>>>>> Tomcat deploys the app it will pick up that file and use the
> > >>>>> mapping
> > >>>>>>>>>> you provide. The contents would be something like
> > >>>>>>>>>>
> > >>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
> > >>>>>>>>>> <Context>
> > >>>>>>>>>> <ResourceLink name="jdbc/wind" global="jdbc/wind"
> > >>>>>>>>>> type="javax.sql.DataSource"/>
> > >>>>>>>>>> </Context>
> > >>>>>>>>>>
> > >>>>>>>>>>
> > >>>>>
> ---------------------------------------------------------------------
> > >>>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >>>>>>>>>> For additional commands, e-mail:
> > >> users-h...@tapestry.apache.org
> > >>>>>>>>>>
> > >>>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>>> --
> > >>>>>>>>> Dmitry Gusev
> > >>>>>>>>>
> > >>>>>>>>> AnjLab Team
> > >>>>>>>>> http://anjlab.com
> > >>>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> George Christman
> > >>>>>>>> www.CarDaddy.com
> > >>>>>>>> P.O. Box 735
> > >>>>>>>> Johnstown, New York
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>>>>>>
> > >>>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Dmitry Gusev
> > >>>>>>
> > >>>>>> AnjLab Team
> > >>>>>> http://anjlab.com
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> George Christman
> > >>>>> www.CarDaddy.com
> > >>>>> P.O. Box 735
> > >>>>> Johnstown, New York
> > >>>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> Dmitry Gusev
> > >>>>
> > >>>> AnjLab Team
> > >>>> http://anjlab.com
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> George Christman
> > >>> www.CarDaddy.com
> > >>> P.O. Box 735
> > >>> Johnstown, New York
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> George Christman
> > >> www.CarDaddy.com
> > >> P.O. Box 735
> > >> Johnstown, New York
> > >>
> > >
> > >
> > >
> > > --
> > > Dmitry Gusev
> > >
> > > AnjLab Team
> > > http://anjlab.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Reply via email to