Here is a pom.xml which includes the Jetty plugin:

https://github.com/mrg/cbe/blob/master/WebApplications/pom.xml

And a jetty-env.xml which defines the JNDI lookup:

https://github.com/mrg/cbe/blob/master/WebApplications/src/main/webapp/WEB-INF/jetty-env.xml


mrg



On Fri, Apr 25, 2014 at 9:40 AM, Michael Gentry <[email protected]>wrote:

> Hi Tim,
>
> RunJettyRun uses plain Jetty and not Jetty+ (which includes the JNDI
> extension).  What I do in my development is use the Jetty Maven plugin and
> then just use Maven to run Jetty.  Has worked pretty well so far for me.
>
>
> On Thu, Apr 24, 2014 at 9:38 PM, D Tim Cummings <[email protected]>wrote:
>
>> Hi
>>
>> I am using cayenne in a tapestry project and my final deployment will be
>> in Tomcat 7 using JNDI for defining the data source. I am developing in
>> Eclipse 4.3.1 and would like my development environment to be as close to
>> deployment as possible. What is the recommended way of using JNDI in
>> development.
>>
>> I have tried the instructions on
>>
>> http://tynamo.org/Developing+with+Tomcat+and+Eclipse
>>
>> using sysdeo tomcat plugin for eclipse. I haven't been able to get it to
>> read the jndi information.
>>
>> Apr 25, 2014 11:25:40 AM org.apache.catalina.deploy.NamingResources
>> addResource
>> WARNING: Failed to create MBean for naming resource [null]
>>
>> I have tried using RunJettyRun but get.
>>
>> Exception happened when loading Jetty.xml:
>> java.lang.ClassNotFoundException: org.eclipse.jetty.plus.jndi.Resource
>>
>>
>> RunJettyRun works great when I configure cayenne-project.xml to
>> XMLPoolingDataSourceFactory but I don't want to have to keep switching
>> between this and JNDI when ready to deploy. I would also prefer to use
>> tomcat in dev so it is same as prod.
>>
>> JNDI works great when I build a war file and deploy to tomcat but that
>> would slow my development if I had to do that every time.
>>
>> I don't necessarily have to solve these problems if you can recommend an
>> alternative way of keeping database config separate to the war. The war
>> will be deployed by unskilled users on Windows and skilled users on Linux
>> and Mac so I am trying to keep the steps to deploy simple and not hard code
>> absolute paths of properties files into my app.
>>
>> Thanks
>>
>> Tim
>>
>
>

Reply via email to