Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA02C11845 for ; Fri, 25 Apr 2014 01:38:41 +0000 (UTC) Received: (qmail 97979 invoked by uid 500); 25 Apr 2014 01:38:41 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 97883 invoked by uid 500); 25 Apr 2014 01:38:40 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 97873 invoked by uid 99); 25 Apr 2014 01:38:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 01:38:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [203.59.1.224] (HELO icp-osb-irony-out7.external.iinet.net.au) (203.59.1.224) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 01:38:35 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtIDAFm7WVN8ll5C/2dsb2JhbAANTINVhFrBTYQ4CYECAYh0pkWkPBeSBIEVBJBziT6FS48Z X-IronPort-AV: E=Sophos;i="4.97,923,1389715200"; d="asc'?scan'208,217";a="517935357" Received: from unknown (HELO [10.1.1.7]) ([124.150.94.66]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 25 Apr 2014 09:38:09 +0800 From: D Tim Cummings Content-Type: multipart/signed; boundary="Apple-Mail=_A7426BF8-D6EE-4711-8EA6-FFFA5E0CC7ED"; protocol="application/pgp-signature"; micalg=pgp-sha512 Subject: How to use JNDI in development Message-Id: <05C4089D-014D-4448-860E-01A259FF50D8@triptera.com.au> Date: Fri, 25 Apr 2014 11:38:08 +1000 To: user@cayenne.apache.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-Mailer: Apple Mail (2.1874) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_A7426BF8-D6EE-4711-8EA6-FFFA5E0CC7ED Content-Type: multipart/alternative; boundary="Apple-Mail=_FCB3D701-C3C5-4D61-A04D-3322A52604EB" --Apple-Mail=_FCB3D701-C3C5-4D61-A04D-3322A52604EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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=20 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.=20 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 --Apple-Mail=_FCB3D701-C3C5-4D61-A04D-3322A52604EB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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 


usin= g 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
= --Apple-Mail=_FCB3D701-C3C5-4D61-A04D-3322A52604EB-- --Apple-Mail=_A7426BF8-D6EE-4711-8EA6-FFFA5E0CC7ED Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJTWbyAAAoJEDzHJ2SZIKQYXkMIAIVY1dy7jPH1sKyQidh1gRYK AtzM7cMBkkkFJdSybFXkvtD+qnqfqTDfWZFZmikAjobrrd+YX0qW3tZke1h+UQRh L5yiAql79r7YLlsMgtCv4VhbevEx28ggwGXt90rmi42+Noiso9p0oLHarYHLOIzs X5QdhoW8L0FwkBNVI4M1gdURWyl7gk5RPJ4ewLEX+wstO+K7ToA25Ho+KHBY52gF QRr+Rux08HkeYPD5AoqUGeoAfImqxhGbqlm2kMmUEPtuWcrYlTYV7Iiq0/2h6SLr W4l+XWr+ZMAcKcpDOEooZyLWJCA+ltJ4aMntxOPj+Tm8wnTzXpPgTrr0BSvXTP0= =cneK -----END PGP SIGNATURE----- --Apple-Mail=_A7426BF8-D6EE-4711-8EA6-FFFA5E0CC7ED--