From kwalker@example.com Tue Jan 01 03:15:13 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 42230 invoked from network); 1 Jan 2008 03:15:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jan 2008 03:15:12 -0000 Received: (qmail 3632 invoked by uid 500); 1 Jan 2008 03:15:01 -0000 Delivered-To: kwalker@example.com Received: (qmail 3615 invoked by uid 500); 1 Jan 2008 03:15:01 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 3606 invoked by uid 99); 1 Jan 2008 03:15:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2007 19:15:00 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2008 03:14:48 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <kwalker@example.com>) id 1J9XaR-0007ve-Nl for kwalker@example.com; Mon, 31 Dec 2007 19:14:39 -0800 Message-ID: <kwalker@example.com> Date: Mon, 31 Dec 2007 19:14:39 -0800 (PST) From: xianzheng <kwalker@example.com> To: kwalker@example.com Subject: Possible bug of redeploying package MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: kwalker@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I tried to hot deploy a jar package using command "openejb deploy A.jar". It was successful. Then I undeployed it using "openejb undeploy A.jar". It completed successful too. But, I then deployed it again using the same command "openejb deploy A.jar". It says A.jar has already been deployed. Is it a bug? or I did something incorrect?:) Please advise. Has anybody experienced this before? P.S. the A.jar under apps of openejb home has not been deleted after undeployed, if I mannually delete the A.jar under $(openejb.home)/apps. I can deploy it again successfully. Joe -- View this message in context: http://www.nabble.com/Possible-bug-of-redeploying-package-tp14564223p14564223.html Sent from the OpenEJB User mailing list kwalker@example.com. From kwalker@example.com Wed Jan 02 16:34:57 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 84158 invoked from network); 2 Jan 2008 16:34:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 16:34:57 -0000 Received: (qmail 16602 invoked by uid 500); 2 Jan 2008 16:34:46 -0000 Delivered-To: kwalker@example.com Received: (qmail 16586 invoked by uid 500); 2 Jan 2008 16:34:46 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 16577 invoked by uid 99); 2 Jan 2008 16:34:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 08:34:45 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO mail.mikon.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 16:34:35 +0000 Message-ID: <kwalker@example.com> Date: Wed, 02 Jan 2008 11:33:58 -0500 From: Paul Spencer <kwalker@example.com> MIME-Version: 1.0 To: kwalker@example.com Subject: Re: OpenEJB war for Tomcat 5.5 References: <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> In-Reply-To: <kwalker@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org David, Thank you. Paul Spencer David Blevins wrote: > Paul, > > I have basic support for Tomcat 5.5 working and checked in. Couple > limitations and things to be aware of: > > 1. Tomcat still will not support the Servlets 2.5 API or web.xml > 2. Dependency Injection not yet working for Filters (works for > serlvets and listeners) > 3. JAX-WS support is not yet functioning. > > Need to go back to hacking on the release. Will come back later and fix > 2 and 3. > > -David > > On Dec 12, 2007, at 5:56 AM, Paul Spencer wrote: > >> Dain, >> What is the status of OpenEJB war for Tomcat 5.5? >> >> Paul Spencer >> >> >> Dain Sundstrom wrote: >>> I'll take a look at it when I get back from visiting my family for >>> Thanksgiving. >>> -dain >>> On Nov 19, 2007, at 8:08 AM, Paul Spencer wrote: >>>> Dain, >>>> At ApacheCon US you demonstrated the use of an OpenEJB war for >>>> Tomcat 6.x as a way of running an EJB 3 application inside a Tomcat >>>> container. Currently my customer are running Tomcat 5.5 on their >>>> servers, so I am requesting a OpenEJB war that will work with Tomcat >>>> 5.5. >>>> >>>> Thank you, >>>> Paul Spencer >> >> > > From kwalker@example.com Wed Jan 02 20:03:57 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 75791 invoked from network); 2 Jan 2008 20:03:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 20:03:57 -0000 Received: (qmail 1719 invoked by uid 500); 2 Jan 2008 20:03:45 -0000 Delivered-To: kwalker@example.com Received: (qmail 1707 invoked by uid 500); 2 Jan 2008 20:03:45 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 1698 invoked by uid 99); 2 Jan 2008 20:03:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 12:03:45 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO spaceymail-a2.g.dreamhost.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 20:03:31 +0000 Received: from [83.161.120.155] (static-71-254-154-152.lsanca.dsl-w.verizon.net [83.161.120.155]) by spaceymail-a2.g.dreamhost.com (Postfix) with ESMTP id BD55EEE3B9 for <kwalker@example.com>; Wed, 2 Jan 2008 12:03:20 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <kwalker@example.com> References: <kwalker@example.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <kwalker@example.com> Content-Transfer-Encoding: 7bit From: Dain Sundstrom <kwalker@example.com> Subject: Re: Possible bug of redeploying package Date: Wed, 2 Jan 2008 12:03:19 -0800 To: kwalker@example.com X-Mailer: Apple Mail (2.753) X-Virus-Checked: Checked by ClamAV on apache.org Joe, This is definitely a bug. Can you file a bug report in our JIRA (https://issues.apache.org/jira/browse/OPENEJB)? This is one we will need to get fixed before the next release. Thanks, -dain On Dec 31, 2007, at 7:14 PM, xianzheng wrote: > > Hi, > I tried to hot deploy a jar package using command "openejb deploy > A.jar". It > was successful. > Then I undeployed it using "openejb undeploy A.jar". It completed > successful > too. > > But, I then deployed it again using the same command "openejb > deploy A.jar". > It says A.jar has already been deployed. > Is it a bug? or I did something incorrect?:) Please advise. Has > anybody > experienced this before? > > P.S. the A.jar under apps of openejb home has not been deleted after > undeployed, if I mannually delete the A.jar under $(openejb.home)/ > apps. I > can deploy it again successfully. > > Joe > -- > View this message in context: http://www.nabble.com/Possible-bug-of- > redeploying-package-tp14564223p14564223.html > Sent from the OpenEJB User mailing list kwalker@example.com. > From kwalker@example.com Wed Jan 02 21:55:59 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 13484 invoked from network); 2 Jan 2008 21:55:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 21:55:58 -0000 Received: (qmail 88013 invoked by uid 500); 2 Jan 2008 21:55:46 -0000 Delivered-To: kwalker@example.com Received: (qmail 87997 invoked by uid 500); 2 Jan 2008 21:55:46 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 87981 invoked by uid 99); 2 Jan 2008 21:55:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 13:55:46 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO g2host.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 21:55:21 +0000 Received: from [83.161.120.155] (account kwalker@example.com HELO [83.161.120.155]) by mailfront2.g2host.com (CommuniGate Pro SMTP 5.1.10) with ESMTPSA id 30493690 for kwalker@example.com; Wed, 02 Jan 2008 15:55:18 -0600 Message-Id: <kwalker@example.com> From: David Blevins <kwalker@example.com> To: kwalker@example.com In-Reply-To: <kwalker@example.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: Possible bug of redeploying package Date: Wed, 2 Jan 2008 13:55:23 -0800 References: <kwalker@example.com> <kwalker@example.com> X-Mailer: Apple Mail (2.915) X-Virus-Checked: Checked by ClamAV on apache.org On Jan 2, 2008, at 12:03 PM, Dain Sundstrom wrote: > Joe, > > This is definitely a bug. Can you file a bug report in our JIRA (https://issues.apache.org/jira/browse/OPENEJB)? > This is one we will need to get fixed before the next release. Filed https://issues.apache.org/jira/browse/OPENEJB-746 -David > On Dec 31, 2007, at 7:14 PM, xianzheng wrote: > >> >> Hi, >> I tried to hot deploy a jar package using command "openejb deploy >> A.jar". It >> was successful. >> Then I undeployed it using "openejb undeploy A.jar". It completed >> successful >> too. >> >> But, I then deployed it again using the same command "openejb >> deploy A.jar". >> It says A.jar has already been deployed. >> Is it a bug? or I did something incorrect?:) Please advise. Has >> anybody >> experienced this before? >> >> P.S. the A.jar under apps of openejb home has not been deleted after >> undeployed, if I mannually delete the A.jar under $(openejb.home)/ >> apps. I >> can deploy it again successfully. >> >> Joe >> -- >> View this message in context: http://www.nabble.com/Possible-bug-of-redeploying-package-tp14564223p14564223.html >> Sent from the OpenEJB User mailing list kwalker@example.com. >> > > From kwalker@example.com Sat Jan 05 09:48:03 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 81390 invoked from network); 5 Jan 2008 09:48:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 5 Jan 2008 09:48:03 -0000 Received: (qmail 75054 invoked by uid 500); 5 Jan 2008 09:47:52 -0000 Delivered-To: kwalker@example.com Received: (qmail 74862 invoked by uid 500); 5 Jan 2008 09:47:51 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 74853 invoked by uid 99); 5 Jan 2008 09:47:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2008 01:47:51 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2008 09:47:26 +0000 Received: by wa-out-1112.google.com with SMTP id m28so11408317wag.13 for <kwalker@example.com>; Sat, 05 Jan 2008 01:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=FIhfebFF3tjoZN/mN44MsJXKB7bMxWlvkmMbCpHfbw4=; b=cfdGrvAeYlHkD1WGODj7WeYQugH2OLXdB3Ks9HIXdOThAqbyynHul3dvargTFKXofFid1+ZbMuVFsj5VvOxcPXVzcqYsA6r0UpqL15Ubcab37iZVRxkIyzHJg77x5PzejONuJxeQ6u84CRBF/7Vi/s6aYabM8CrguCNoooFu65c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=AH5zR1chwzLw2Uk8lqY6Afvt9TZgo0Jp0ahX63DIacGvNv7eX3Z4j796Ih+Yj4LGy+RVVclWqK/na9olEJkiAuL9rwUzXfrQWKHQNkXwoyW+ByLMezp5TwBfmb5nNXmIVdRMfcBn3zfvda04bzlNqRt+63XcHdpZaJ9bybW86wU= Received: by 83.161.120.155 with SMTP id y1mr19611999wac.25.1199526451105; Sat, 05 Jan 2008 01:47:31 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sat, 5 Jan 2008 01:47:31 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sat, 5 Jan 2008 10:47:31 +0100 From: "Jacek Laskowski" <kwalker@example.com> Reply-To: kwalker@example.com Sender: kwalker@example.com To: kwalker@example.com Subject: Re: Alternatives to persistence provider properties in persistence.xml file? In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <kwalker@example.com> X-Google-Sender-Auth: 164a07727563627d X-Virus-Checked: Checked by ClamAV on apache.org On Dec 13, 2007 4:22 AM, Alexander Saint Croix <kwalker@example.com> wrote: > I wonder whether there is any way for me to NOT include the <provider> and > <properties> elements defining the persistence provider implementation, > connection URL, connection driver name, username and password in the > persistence.xml file for my entity/POJO jar (the one inside of WEB-INF/lib), > but rather configure that specific portion of the persistence.xml file > inside of the context of the application that is using these beans? It > doesn't seem to be any of the POJO JAR's business what type of persistence > provider is being used to persist its contents. It's been a while since you wrote it, but I thought I'd jump in and add a little. Simple answer is NO - you can't. It's because that's the main goal of a ejb container to manage all what needs to be managed, e.g. jpa entity managers. When <provider> is left out it means you rely on the default jpa provider of a ejb container. <properties> are not required at all and are to configure parameters that are specific to a given jpa provider. Your persistence.xml file could look as follows: <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="example" /> </persistence> All other elements and attributes are optional. You won't be able to override the values from persistence.xml file unless you do the job of an ejb container, i.e. you get your hands dirty managing jpa objects, like jpa entity manager factory and its entity managers. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl From kwalker@example.com Sun Jan 06 09:51:58 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 58362 invoked from network); 6 Jan 2008 09:51:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 09:51:58 -0000 Received: (qmail 40011 invoked by uid 500); 6 Jan 2008 09:51:47 -0000 Delivered-To: kwalker@example.com Received: (qmail 39989 invoked by uid 500); 6 Jan 2008 09:51:47 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 39980 invoked by uid 99); 6 Jan 2008 09:51:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 01:51:47 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 09:51:23 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <kwalker@example.com>) id 1JBSAC-0003qV-0k for kwalker@example.com; Sun, 06 Jan 2008 01:51:28 -0800 Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 01:51:28 -0800 (PST) From: ManojS <kwalker@example.com> To: kwalker@example.com Subject: OpenEJB - Datasource lookup problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: kwalker@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hello, I was playing with openejb and a test ejb application in my machine. My intention was to identify how much openejb is useful for me as an ejb container, so that I can recommend to use at my workplace. While I was trying to integrate openejb along with the application I cannot able to lookup the datasource connection defined in the openejb.conf file. If I explain in detail, my openejb.conf has the following connection configuration. <Connector id="MyDatasource" type="Datasource"> JdbcDriver org.gjt.mysql.Driver JdbcUrl jdbc:mysql://localhost:3306/test_db UserName root Password 12345 jtamanaged true </Connector> I am using the "Default Stateless Container" with ctype="STATELESS". And my ejb code (my ejbs are stateless session beans) for datasource lookup is as follows, public Connection getConnection () throws Exception { Context ctx = new InitialContext(); Datasource ds = (Datasource) ctx.lookup( "MyDatasource" ); return (ds!=null?ds.getConnection():null); } This code is throwing a javax.naming.NameNotFoundException. I tried with various other JNDI names like "java:comp/MyDatasource", "java:openejb/MyDatasource" etc. But the same result. The openejb version I am using is 1.0, because the EJB version I was using is 2.0. Can anyone help me to figure out what is the JNDI name to use for connector lookup ? Thanks in advance. Manoj. -- View this message in context: http://www.nabble.com/OpenEJB---Datasource-lookup-problem-tp14645858p14645858.html Sent from the OpenEJB User mailing list kwalker@example.com. From kwalker@example.com Sun Jan 06 15:38:24 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 95161 invoked from network); 6 Jan 2008 15:38:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 15:38:24 -0000 Received: (qmail 83026 invoked by uid 500); 6 Jan 2008 15:38:13 -0000 Delivered-To: kwalker@example.com Received: (qmail 83008 invoked by uid 500); 6 Jan 2008 15:38:13 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 82999 invoked by uid 99); 6 Jan 2008 15:38:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 07:38:12 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO fg-out-1718.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 15:37:49 +0000 Received: by fg-out-1718.google.com with SMTP id e12so3764593fga.5 for <kwalker@example.com>; Sun, 06 Jan 2008 07:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=LcYTs2OwxnSE45mumFkQjHF7AE7IxWOmaNY1soRKLN8=; b=S3wKwUZn+PxctFd9r3/btinOTBUyGJ5N6wobnW/wV98Aqqos2g2KdrwEVaSW1TksLdWOZBuRR8d5lxVQ4U68OvRMcVIdHED6/L2gNggKO1Bv9x0929DfiVjKE9jghjT89nO3n9WA+FuSqEN91hxxvDoLyMf63WD1yWHCXQofvWQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=jJya3/bPP4wHBWXOF5lrZy7SVhotWDtOQpLw1PwcN/SJ0XI8FuCuS5BO9Pn0QfrquLneb8F6nqF4AWXxkE05V0MrtGHggKSv0T5MUVJYU5ez4JI8nxxhw9Ffqj80FKizHods6Ej1H0W1CYJvdm6DOJpdNxbXi+YaoJdLOB6xDJE= Received: by 83.161.120.155 with SMTP id w15mr19127662fga.9.1199633873592; Sun, 06 Jan 2008 07:37:53 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 07:37:53 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 17:37:53 +0200 From: "Mohammad Nour El-Din" <kwalker@example.com> To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9142_8306426.1199633873599" References: <kwalker@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9142_8306426.1199633873599 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi ManojS... First thanks for using OpenEJB and thanks again for sharing your problems with us to tyr make OpenEJB better :). I recommend to use OpenEJB 3.0 as it is the most updated version and all of the current development is made on it. I still can't understand from where you call this method, is it a method in your bean ??? but from what I see in the code, you have to initialize the naming conext first with the proper poperties to be able to use. If it is applicable we would like to look at your code to give a more precise answer. On Jan 6, 2008 11:51 AM, ManojS <kwalker@example.com> wrote: > > Hello, > > I was playing with openejb and a test ejb application in my machine. My > intention was to identify how much openejb is useful for me as an ejb > container, so that I can recommend to use at my workplace. While I was > trying to integrate openejb along with the application I cannot able to > lookup the datasource connection defined in the openejb.conf file. If I > explain in detail, my openejb.conf has the following connection > configuration. > > <Connector id="MyDatasource" type="Datasource"> > JdbcDriver org.gjt.mysql.Driver > JdbcUrl jdbc:mysql://localhost:3306/test_db > UserName root > Password 12345 > jtamanaged true > </Connector> > > I am using the "Default Stateless Container" with ctype="STATELESS". And > my > ejb code (my ejbs are stateless session beans) for datasource lookup is as > follows, > > public Connection getConnection () throws Exception { > Context ctx = new InitialContext(); > Datasource ds = (Datasource) ctx.lookup( "MyDatasource" ); > return (ds!=null?ds.getConnection():null); > } > > This code is throwing a javax.naming.NameNotFoundException. I tried with > various other JNDI names like "java:comp/MyDatasource", > "java:openejb/MyDatasource" etc. But the same result. > > The openejb version I am using is 1.0, because the EJB version I was using > is 2.0. > > Can anyone help me to figure out what is the JNDI name to use for > connector > lookup ? > > Thanks in advance. > > Manoj. > > -- > View this message in context: > http://www.nabble.com/OpenEJB---Datasource-lookup-problem-tp14645858p14645858.html > Sent from the OpenEJB User mailing list kwalker@example.com. > > -- Thanks - Mohammad Nour ------=_Part_9142_8306426.1199633873599-- From kwalker@example.com Sun Jan 06 15:41:01 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 95651 invoked from network); 6 Jan 2008 15:41:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 15:41:01 -0000 Received: (qmail 84441 invoked by uid 500); 6 Jan 2008 15:40:49 -0000 Delivered-To: kwalker@example.com Received: (qmail 84427 invoked by uid 500); 6 Jan 2008 15:40:49 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 84418 invoked by uid 99); 6 Jan 2008 15:40:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 07:40:49 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO hu-out-0506.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 15:40:25 +0000 Received: by hu-out-0506.google.com with SMTP id 34so1017776hud.10 for <kwalker@example.com>; Sun, 06 Jan 2008 07:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=psZt6siU2R9TVnrNgZFmNBZTIuN03BsfIMy8yXLcRQA=; b=Hu6jsIQ7Lag4VzBgSYRStTsmiZfMfjPjdTMe+pFJ+uRGWvm61orGoB97zo5ojq/uP26czagSyleOziNWULZ/ToeUvJofvHStJ8kqOxlAww5DL8kQpawMlOMzPEMfVOpxdPaMS4l+s2du3qdhBJ9OYay174l3rrz2WV2VP456FkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=VJBVUS37DOc07IgquT9Zih6yT1ti2JRcQCtIWey8uvenb3dEeDmCKM54uZKvNVn7wYNibmEXvfyDiVb4s2FH1xBDHhs9JAPVtsXDWIrPIBYGhGFVRqgPqQ9YbohdcpdZtirhpg3P3SOC1U58lqq4XZOu2N5Dr1YsyP0hRhsnF4k= Received: by 83.161.120.155 with SMTP id v17mr19111966fga.74.1199634029317; Sun, 06 Jan 2008 07:40:29 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 07:40:29 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 17:40:29 +0200 From: "Mohammad Nour El-Din" <kwalker@example.com> To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9159_23739886.1199634029293" References: <kwalker@example.com> <kwalker@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9159_23739886.1199634029293 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You can find OpenEJB 3.0 here http://openejb.apache.org/openejb-30-beta-1.html On Jan 6, 2008 5:37 PM, Mohammad Nour El-Din <kwalker@example.com> wrote: > Hi ManojS... > > First thanks for using OpenEJB and thanks again for sharing your > problems with us to tyr make OpenEJB better :). I recommend to use OpenEJB > 3.0 as it is the most updated version and all of the current development > is made on it. I still can't understand from where you call this method, is > it a method in your bean ??? but from what I see in the code, you have to > initialize the naming conext first with the proper poperties to be able to > use. If it is applicable we would like to look at your code to give a more > precise answer. > > > On Jan 6, 2008 11:51 AM, ManojS <kwalker@example.com> wrote: > > > > > Hello, > > > > I was playing with openejb and a test ejb application in my machine. My > > intention was to identify how much openejb is useful for me as an ejb > > container, so that I can recommend to use at my workplace. While I was > > trying to integrate openejb along with the application I cannot able to > > lookup the datasource connection defined in the openejb.conf file. If I > > explain in detail, my openejb.conf has the following connection > > configuration. > > > > <Connector id="MyDatasource" type="Datasource"> > > JdbcDriver org.gjt.mysql.Driver > > JdbcUrl jdbc:mysql://localhost:3306/test_db > > UserName root > > Password 12345 > > jtamanaged true > > </Connector> > > > > I am using the "Default Stateless Container" with ctype="STATELESS". And > > my > > ejb code (my ejbs are stateless session beans) for datasource lookup is > > as > > follows, > > > > public Connection getConnection () throws Exception { > > Context ctx = new InitialContext(); > > Datasource ds = (Datasource) ctx.lookup( "MyDatasource" ); > > return (ds!=null?ds.getConnection():null); > > } > > > > This code is throwing a javax.naming.NameNotFoundException. I tried with > > various other JNDI names like "java:comp/MyDatasource", > > "java:openejb/MyDatasource" etc. But the same result. > > > > The openejb version I am using is 1.0, because the EJB version I was > > using > > is 2.0. > > > > Can anyone help me to figure out what is the JNDI name to use for > > connector > > lookup ? > > > > Thanks in advance. > > > > Manoj. > > > > -- > > View this message in context: http://www.nabble.com/OpenEJB---Datasource-lookup-problem-tp14645858p14645858.html > > > > Sent from the OpenEJB User mailing list kwalker@example.com. > > > > > > > -- > Thanks > - Mohammad Nour -- Thanks - Mohammad Nour ------=_Part_9159_23739886.1199634029293-- From kwalker@example.com Sun Jan 06 15:42:03 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 95850 invoked from network); 6 Jan 2008 15:42:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 15:42:03 -0000 Received: (qmail 84792 invoked by uid 500); 6 Jan 2008 15:41:52 -0000 Delivered-To: kwalker@example.com Received: (qmail 84775 invoked by uid 500); 6 Jan 2008 15:41:52 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 84766 invoked by uid 99); 6 Jan 2008 15:41:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 07:41:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 15:41:27 +0000 Received: by wa-out-1112.google.com with SMTP id m28so12275947wag.13 for <kwalker@example.com>; Sun, 06 Jan 2008 07:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Ctjvz4WitHQBQAkuZsGeYbOLZEDpbZ3B6AJzC2YVrrY=; b=AwQNg9Lxh7QUvkxMwdKHSfvQamXjEDK4F2fUOwv2yyeMY67m4jwO7ZGq2DV4ytalRPBmppNPrfguym6nisZPssMwgnWApFHZvI0GvBpljhjA4WarkJGCMZNGy+LSp0QlCUBXTgJ7JYe2ZCzwSz4jsGpPTjyhPAoWaAF/1nhO6YI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=rj2iRs4q9ORi5Bc1SUtH62+JkZKOsDXUJVLhPprb62Td8NWtx0ECc0Um5yS3K9v4jxR5niDeKQg9AXqK7QyaI2RPYwEJTojxZWGSFFxr89e3/x8T8gKt/2m3Rone2rjRhA3RDw0jM7c5DCznAo58lhBo0zHxJF+L8dmrMq+lnOI= Received: by 83.161.120.155 with SMTP id d1mr2833211waf.10.1199634092158; Sun, 06 Jan 2008 07:41:32 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 07:41:32 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 16:41:32 +0100 From: "Jacek Laskowski" <kwalker@example.com> Reply-To: kwalker@example.com Sender: kwalker@example.com To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <kwalker@example.com> X-Google-Sender-Auth: c5b5281358ef8531 X-Virus-Checked: Checked by ClamAV on apache.org On Jan 6, 2008 10:51 AM, ManojS <kwalker@example.com> wrote: > The openejb version I am using is 1.0, because the EJB version I was using > is 2.0. OpenEJB 3.0 (and any EJB3-compliant container) is fully backward-compatible with the previous ejb specs so using ejb 2.0 doesn't necessarily mandate previous openejb releases. Having said this, I'd stronly recommend using OpenEJB 3.0 as the ejb container of your choice. Once you're at openejb3 level look it up via java:openejb/Resource/MyDatasource (Connector element has recently been deprecated). Download OpenEJB 3.0 from http://people.apache.org/~jlaskowski/openejb-3.0.0-SNAPSHOT-bin.tar.gz. It's a build from today's sources. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl From kwalker@example.com Sun Jan 06 15:44:10 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 96097 invoked from network); 6 Jan 2008 15:44:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 15:44:10 -0000 Received: (qmail 85759 invoked by uid 500); 6 Jan 2008 15:43:59 -0000 Delivered-To: kwalker@example.com Received: (qmail 85744 invoked by uid 500); 6 Jan 2008 15:43:59 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 85733 invoked by uid 99); 6 Jan 2008 15:43:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 07:43:59 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 15:43:34 +0000 Received: by wa-out-1112.google.com with SMTP id m28so12276968wag.13 for <kwalker@example.com>; Sun, 06 Jan 2008 07:43:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=n+di3QSngS1UrAd/vditjE0EE5xGquf1WkHfGsNRnys=; b=qEjNzrgLUq6s522RgG/6wlJGrvJSfDzktGMLMbDZ0AS7+J63kcqfm3u/ppDnnJsZ78bnJfalDKNvU96oTwsrBZsRhK0KnmVGwkwyDmGY8H/hdacQcDvFdrPHrIliG/+K9fR/PHKHU87TGtYgXeZQi/hA9wDQOH4bRFI9NJrvVGU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=FH6tiB81xnNyWtK6kVsjVd4m4T5uf0wMv3GM8RdEnNNH9sa5RsQcheRNeQTNvnuF5WJUHPYwV75er3uVkcCwRJYK+h4K6tsy5f6syMdjwZmIzhx/DdWAUtBtQogAa61rXg75AzYBdQcZRf1hCqxp2mHsGbEZZrO2eauJMPu0DjM= Received: by 83.161.120.155 with SMTP id p2mr16428883waa.1.1199634218570; Sun, 06 Jan 2008 07:43:38 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 07:43:38 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 16:43:38 +0100 From: "Jacek Laskowski" <kwalker@example.com> Reply-To: kwalker@example.com Sender: kwalker@example.com To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <kwalker@example.com> <kwalker@example.com> X-Google-Sender-Auth: 38e94f2612b377c9 X-Virus-Checked: Checked by ClamAV on apache.org On Jan 6, 2008 4:37 PM, Mohammad Nour El-Din <kwalker@example.com> wrote: > First thanks for using OpenEJB and thanks again for sharing your problems > with us to tyr make OpenEJB better :). I recommend to use OpenEJB 3.0 as it > is the most updated version and all of the current development is made on > it. I still can't understand from where you call this method, is it a method > in your bean ??? but from what I see in the code, you have to initialize the > naming conext first with the proper poperties to be able to use. If it is > applicable we would like to look at your code to give a more precise answer. I can't believe you responded the same time as I did! Some say: there're minds who think alike (it goes differently, but anyway it explains why we did so too ;-)). Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl From kwalker@example.com Sun Jan 06 17:30:14 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 18773 invoked from network); 6 Jan 2008 17:30:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 17:30:14 -0000 Received: (qmail 62291 invoked by uid 500); 6 Jan 2008 17:30:03 -0000 Delivered-To: kwalker@example.com Received: (qmail 62281 invoked by uid 500); 6 Jan 2008 17:30:03 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 62272 invoked by uid 99); 6 Jan 2008 17:30:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 09:30:03 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 17:29:38 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <kwalker@example.com>) id 1JBZJe-0007lH-VU for kwalker@example.com; Sun, 06 Jan 2008 09:29:42 -0800 Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 09:29:42 -0800 (PST) From: ManojS <kwalker@example.com> To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: kwalker@example.com References: <kwalker@example.com> <kwalker@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much Mohammad and Jacek for your quick replies. Yes, I missed to set the JNDI context factory kwalker@example.com. Now the API has changed as follows. public Connection getConnection () throws Exception { Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory"); Context ctx = new InitialContext(properties); Datasource ds = (Datasource) ctx.lookup( "MyDatasource" ); return (ds!=null?ds.getConnection():null); } I have implemented this method in a session bean only. Also, for your information, I have added the datasource as resource referense in my "ejb-jar.xml" and "openejb-jar.xml" files for the session bean as follows. <resource-ref> <res-ref-name>MyDatasource</res-ref-name> <res-type>javax.sql.DataSource</res-type> </resource-ref> Still the problem exist. Now, as you all suggested, I will use the latest openejb 3.0. Let me configure it first, and then in any case of issues I will come back to you for help. Thank you very much for your help. Manoj. Jacek Laskowski wrote: > > On Jan 6, 2008 10:51 AM, ManojS <kwalker@example.com> wrote: > >> The openejb version I am using is 1.0, because the EJB version I was >> using >> is 2.0. > > OpenEJB 3.0 (and any EJB3-compliant container) is fully > backward-compatible with the previous ejb specs so using ejb 2.0 > doesn't necessarily mandate previous openejb releases. Having said > this, I'd stronly recommend using OpenEJB 3.0 as the ejb container of > your choice. > > Once you're at openejb3 level look it up via > java:openejb/Resource/MyDatasource (Connector element has recently > been deprecated). > > Download OpenEJB 3.0 from > http://people.apache.org/~jlaskowski/openejb-3.0.0-SNAPSHOT-bin.tar.gz. > It's a build from today's sources. > > Jacek > > -- > Jacek Laskowski > http://www.JacekLaskowski.pl > > -- View this message in context: http://www.nabble.com/OpenEJB---Datasource-lookup-problem-tp14645858p14651115.html Sent from the OpenEJB User mailing list kwalker@example.com. From kwalker@example.com Sun Jan 06 18:29:26 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 37999 invoked from network); 6 Jan 2008 18:29:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 18:29:26 -0000 Received: (qmail 98639 invoked by uid 500); 6 Jan 2008 18:29:14 -0000 Delivered-To: kwalker@example.com Received: (qmail 98618 invoked by uid 500); 6 Jan 2008 18:29:14 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 98609 invoked by uid 99); 6 Jan 2008 18:29:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 10:29:14 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 18:28:49 +0000 Received: by wa-out-1112.google.com with SMTP id m28so12356524wag.13 for <kwalker@example.com>; Sun, 06 Jan 2008 10:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=weui6l/bpWe6ocouUi7snVkYGESKr3qEXwKkzNIsDsQ=; b=REujMIll931pnWOf1JIVJO4qtolsMV/JJXDR/pvwCO80N4dbCCPVXV43qqCjmRyGxKGA7GYi+uTWxiyp+ulCzO1lzIi0xQmVwiTjpf5XnQcWBqE43wBi9Lqx/xHW1rIqhkCcfJnQsECofgZO5CzZnLa3BI1ar5a4cRFlUQad9EI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=PuqGe5GPRdlypENUCLuC+45RwogIXUT0p5TgW7HFC8xhaavgVSOL4N6nC85HfNJuvHAbR9gqIIdoxKOmxnIKezDiWGg5qhj0ErSE8QwP4zV1a9vFfJV99AL9WP0MHDeCbvtE4A1kxcTD8IfvKHqK0/btPEcCMiDrv9r/baqJDVk= Received: by 83.161.120.155 with SMTP id y13mr3961528wad.60.1199644134536; Sun, 06 Jan 2008 10:28:54 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 10:28:54 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 19:28:54 +0100 From: "Jacek Laskowski" <kwalker@example.com> Reply-To: kwalker@example.com Sender: kwalker@example.com To: kwalker@example.com Subject: Re: OpenEJB - Datasource lookup problem In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> X-Google-Sender-Auth: 3ce4e80f255a3417 X-Virus-Checked: Checked by ClamAV on apache.org On Jan 6, 2008 6:29 PM, ManojS <kwalker@example.com> wrote: > Now, as you all suggested, I will use the latest openejb 3.0. Let me > configure it first, and then in any case of issues I will come back to you > for help. Please report any issues you come across here as it's much easier for us to configure openejb (if necessary at all) so you can concentrate on ejb3 rather than on openejb itself (which should be as minimally time-consuming and intrusive as possible). Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl From kwalker@example.com Sun Jan 06 22:06:07 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 84719 invoked from network); 6 Jan 2008 22:06:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 22:06:07 -0000 Received: (qmail 49580 invoked by uid 500); 6 Jan 2008 22:05:56 -0000 Delivered-To: kwalker@example.com Received: (qmail 49563 invoked by uid 500); 6 Jan 2008 22:05:56 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 49554 invoked by uid 99); 6 Jan 2008 22:05:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 14:05:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO g2host.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 22:05:44 +0000 Received: from [83.161.120.155] (account kwalker@example.com HELO [83.161.120.155]) by mailfront1.g2host.com (CommuniGate Pro SMTP 5.1.10) with ESMTPSA id 31617212 for kwalker@example.com; Sun, 06 Jan 2008 16:05:29 -0600 Message-Id: <kwalker@example.com> From: David Blevins <kwalker@example.com> To: kwalker@example.com In-Reply-To: <kwalker@example.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: OpenEJB - Datasource lookup problem Date: Sun, 6 Jan 2008 14:05:24 -0800 References: <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> X-Mailer: Apple Mail (2.915) X-Virus-Checked: Checked by ClamAV on apache.org On Jan 6, 2008, at 9:29 AM, ManojS wrote: > > Thank you very much Mohammad and Jacek for your quick replies. > > Yes, I missed to set the JNDI context factory kwalker@example.com. Now > the API > has changed as follows. > > public Connection getConnection () throws Exception { > Properties properties = new Properties(); > properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, > "org.apache.openejb.client.LocalInitialContextFactory"); > Context ctx = new InitialContext(properties); > Datasource ds = (Datasource) ctx.lookup( "MyDatasource" ); > return (ds!=null?ds.getConnection():null); > } > > I have implemented this method in a session bean only. Also, for your > information, I have added the datasource as resource referense in my > "ejb-jar.xml" and "openejb-jar.xml" files for the session bean as > follows. > > <resource-ref> > <res-ref-name>MyDatasource</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > </resource-ref> > > Still the problem exist. > > Now, as you all suggested, I will use the latest openejb 3.0. Let me > configure it first, and then in any case of issues I will come back > to you > for help. As a general practice I recommend checking the log files too. We print very specific information there as well. Say for example you forgot to implement some methods from your EJBObject interface in your bean, we will print a list of every method you need to add. Say you decide to start using ejb3 annotations and you try something like this '@Resource EntityManager', we're going to output a message saying that you need to use '@PersistenceContext EntityManager' for injection of an EntityManager, etc. etc. It's our belief that if you make a mistake and we didn't catch it in a good way and tell you enough information to move forward that the mistake is really ours. So definitely let us know if you run into any situation where the error could be more helpful. -David From kwalker@example.com Sun Jan 06 22:43:15 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 93230 invoked from network); 6 Jan 2008 22:43:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 22:43:14 -0000 Received: (qmail 92580 invoked by uid 500); 6 Jan 2008 22:43:03 -0000 Delivered-To: kwalker@example.com Received: (qmail 92559 invoked by uid 500); 6 Jan 2008 22:43:03 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 92549 invoked by uid 99); 6 Jan 2008 22:43:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 14:43:03 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO hs-out-2122.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 22:42:39 +0000 Received: by hs-out-2122.google.com with SMTP id j58so6065254hsj.11 for <kwalker@example.com>; Sun, 06 Jan 2008 14:42:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=K04fn1DN+A/4VSVKATqpfjtNDyAt8GS74Inq4b770tw=; b=EB1Z7Dl4kKz9nH/M6fC+JzwdrvyOl3gbJmTMDnuh1ZlyCmoI/qzwe+8jwq7RaMG1tp1BkR4RbE1VRxaOtdeGfSi/cqPfs3YeicV8/NnRgAcutZdL4l/kM7TgWCOgOsKs4Qc8oD1L1QD6I/NyWIH9xTG/ajy3qhYAL2R9BqQDYes= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=ltE0Y7kqlkwbSFjN0tZqG2YSLZ1zle0kJo2ZVHAU2N5sgIdDm5toplu8stbu2laStXls/Op/dvq3Ee5pExDJ3hAcYMHWmEuYiqLIhUKOtiQoWq35fGH/CYisod3uf9uta963KF48w9qAXWkx8wj5QY86bMS9z3kJCb/RC5g1ldo= Received: by 83.161.120.155 with SMTP id r9mr3072145ybd.110.1199659364246; Sun, 06 Jan 2008 14:42:44 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 14:42:44 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 16:42:44 -0600 From: "Alexander Saint Croix" <kwalker@example.com> To: kwalker@example.com, kwalker@example.com Subject: Nuking tables on tearDown() for CRUD tests MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15271_5653502.1199659364233" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_15271_5653502.1199659364233 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I'm doing CRUD tests on a collection of integrated entities in a shared persistence unit, and am encountering some errors because of crufty tables from previous tests. I'm looking for a means of guaranteeing that the tables for each of my entities is devoid of entries after each test runs. The appropriate place to do this would be in the tearDown() method of the unit test class. My environment is OpenEJB (3.0.0 core, latest snapshot), OpenJPA and an in-memory HSQLDB. OS X on Java 5. At the moment, I've implemented a stateless session bean to manage persistence for me. It's using an injected entity manager to perform a series of DELETE statements. Here's how the EM is set up: @PersistenceContext(unitName = "party-test-unit", type = PersistenceContextType.TRANSACTION) private EntityManager entityManager; I want to stress that I was previously removing entries from the database by getting a list of components of a given class, then iteratively deleting them. This worked just fine, but was very inefficient and slowed down the builds more than was acceptable. My clear() method defines a String[] of table names, then recursively creates a Query("DELETE FROM " + table) for each of the bean class names in the package I'm testing. Here is the code: public void clear() { Set<Query> queries = new HashSet<Query>(); String[] types = { "Address", "AssociatedAddress", "EmailAddress", "GeographicAddress", "ISOCountryCode", "Locale", "TelecomAddress", "WebPageAddress", "AssignedResponsibility", "Capability", "PartyRelationship", "PartyRelationshipType", "PartyRole", "PartyRoleType", "Responsibility", "Organization", "OrganizationName", "Party", "PartySignature", "Person", "PersonName", "Preference", "PreferenceOption", "PreferenceType", "Property", "RegisteredIdentifier"}; for(String table : types) { queries.add(entityManager.createQuery("DELETE FROM " + table)); } for(Query query : queries) query.executeUpdate(); } This method *usually* works. However, sometimes I get *very* strange nonapplication exceptions that are causing what appear to be intermittent test failures. By intermittent I mean a given unit test method might pass during one "mvn clean build" process, then fail immediately afterward during a second "mvn clean build" process, without any alterations to the source or testing code. This happens on some tests, sometimes, and not on others, other times, and I can discern no clear pattern. One example of the error output is listed at the bottom of this message. So, what I'm really looking for is a performant way to guarantee that my tables are empty between unit tests, so that I'm essentially starting from a completely clean environment. I welcome any suggestions, and will even entertain non-specification compliant mechanisms provided by OpenEJB or OpenJPA to accomplish this. Dain mentioned that I might completely drop and restart OpenEJB between tests. He also mentioned that OpenJPA might have a way to wipe the database tables clean for a given persistence unit. I'm interested in any ideas or feedback about this. Regards, -- Alexander R. Saint Croix As promised, here is the error: ------------------------------------------------------------------------------- Test set: org.eremite.corm.party.PersistenceTest ------------------------------------------------------------------------------- Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.749 sec <<< FAILURE! testPartySignatureAnnotations(org.eremite.corm.party.PersistenceTest) Time elapsed: 0.466 sec <<< ERROR! javax.ejb.EJBException: The bean encountered a non-application exception.; nested exception is: <openjpa-1.0.1-r420667:592145 fatal general error> org.apache.openjpa.persistence.PersistenceException: kwalker@example.com( BaseEjbProxyHandler.java:366) at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke( BaseEjbProxyHandler.java:323) at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke( Jdk13InvocationHandler.java:49) at $Proxy19.clear(Unknown Source) at org.eremite.corm.party.PersistenceTest.testPartySignatureAnnotations( PersistenceTest.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:228) at junit.framework.TestSuite.run(TestSuite.java:223) at org.junit.internal.runners.OldTestClassRunner.run( OldTestClassRunner.java:35) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute( JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet( AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute( AbstractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess( SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main( SurefireBooter.java:818) Caused by: <openjpa-1.0.1-r420667:592145 fatal general error> org.apache.openjpa.persistence.PersistenceException: kwalker@example.com( StateManagerImpl.java:799) at org.apache.openjpa.kernel.BrokerImpl$ManagedCache.dirtyCheck( BrokerImpl.java:4620) at org.apache.openjpa.kernel.BrokerImpl$ManagedCache.access$000( BrokerImpl.java:4360) at org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects( BrokerImpl.java:3739) at org.apache.openjpa.kernel.BrokerImpl.setDirty(BrokerImpl.java:3856) at org.apache.openjpa.kernel.StateManagerImpl.setPCState( StateManagerImpl.java:207) at org.apache.openjpa.kernel.StateManagerImpl.dirty( StateManagerImpl.java:1532) at org.apache.openjpa.kernel.StateManagerImpl.dirty( StateManagerImpl.java:1471) at org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck( StateManagerImpl.java:808) at org.apache.openjpa.kernel.BrokerImpl$ManagedCache.dirtyCheck( BrokerImpl.java:4620) at org.apache.openjpa.kernel.BrokerImpl$ManagedCache.access$000( BrokerImpl.java:4360) at org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects( BrokerImpl.java:3739) at org.apache.openjpa.kernel.BrokerImpl.setDirty(BrokerImpl.java:3856) at org.apache.openjpa.kernel.StateManagerImpl.setPCState( StateManagerImpl.java:205) at org.apache.openjpa.kernel.StateManagerImpl.delete( StateManagerImpl.java:1070) at org.apache.openjpa.kernel.BrokerImpl.delete(BrokerImpl.java:2518) at org.apache.openjpa.kernel.SingleFieldManager.delete( SingleFieldManager.java:387) at org.apache.openjpa.kernel.SingleFieldManager.delete( SingleFieldManager.java:373) at org.apache.openjpa.kernel.SingleFieldManager.delete( SingleFieldManager.java:330) at org.apache.openjpa.kernel.SingleFieldManager.delete( SingleFieldManager.java:284) at org.apache.openjpa.kernel.StateManagerImpl.cascadeDelete( StateManagerImpl.java:2817) at org.apache.openjpa.kernel.BrokerImpl.delete(BrokerImpl.java:2517) at org.apache.openjpa.kernel.BrokerImpl.delete(BrokerImpl.java:2482) at org.apache.openjpa.kernel.QueryImpl.deleteInMemory(QueryImpl.java :1020) at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeDelete (ExpressionStoreQuery.java:684) at org.apache.openjpa.kernel.QueryImpl.delete(QueryImpl.java:1008) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:801) at org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:866) at org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:862) at org.apache.openjpa.kernel.DelegatingQuery.deleteAll( DelegatingQuery.java:541) at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java :314) at org.eremite.corm.party.BeanManagerImpl.clear(BeanManagerImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke (ReflectionInvocationContext.java:146) at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed( ReflectionInvocationContext.java:129) at org.apache.openejb.core.interceptor.InterceptorStack.invoke( InterceptorStack.java:67) at org.apache.openejb.core.stateless.StatelessContainer._invoke( StatelessContainer.java:210) at org.apache.openejb.core.stateless.StatelessContainer._invoke( StatelessContainer.java:188) at org.apache.openejb.core.stateless.StatelessContainer.invoke( StatelessContainer.java:165) at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod( EjbObjectProxyHandler.java:217) at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke( EjbObjectProxyHandler.java:77) at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke( BaseEjbProxyHandler.java:321) ... 26 more ------=_Part_15271_5653502.1199659364233-- From kwalker@example.com Sun Jan 06 23:45:06 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 9355 invoked from network); 6 Jan 2008 23:45:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jan 2008 23:45:06 -0000 Received: (qmail 48142 invoked by uid 500); 6 Jan 2008 23:44:55 -0000 Delivered-To: kwalker@example.com Received: (qmail 48129 invoked by uid 500); 6 Jan 2008 23:44:55 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 48120 invoked by uid 99); 6 Jan 2008 23:44:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 15:44:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 23:44:29 +0000 Received: by wa-out-1112.google.com with SMTP id m28so12508042wag.13 for <kwalker@example.com>; Sun, 06 Jan 2008 15:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=HaF1H5zABLqDZ2yQ+XoyY2RbUL821Hnh9bvDErMuu3M=; b=Gr2Lhdgt8MVmGHQq7VOwyGCE6v8eqaTz/VyNVzucEia9keaY9ENkhtmKy96wJ7WllMCl3mJTwP7aqbZzsAqQYK82vUuVXV0FDngoSiGWEhQ7gEaYy3tZ3znfQJ8CegA8Ics5yj2KORXySALc3KHwSG7nCuDkuZw5vUKgfWSt2qQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=mQOW7tA74x8vmxYZ32RJETOYTeukKfcdhRO7QfbPvvh8/RKZ81vNl29/cOHUd2cvxoGwGNQLtqPgSh02R1UEXg2BA+CQgociwfAWJLju4rk+jgajXBYUgbCaNybz3lPESQP258dfNTLPcr5hZ+dk9BYubZtdsU4Jgq3EU4S5Mb0= Received: by 83.161.120.155 with SMTP id b1mr4947180waa.134.1199663074228; Sun, 06 Jan 2008 15:44:34 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 15:44:34 -0800 (PST) Message-ID: <kwalker@example.com> Date: Mon, 7 Jan 2008 00:44:34 +0100 From: "Jacek Laskowski" <kwalker@example.com> Reply-To: kwalker@example.com Sender: kwalker@example.com To: kwalker@example.com Subject: Re: Nuking tables on tearDown() for CRUD tests In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <kwalker@example.com> X-Google-Sender-Auth: 6124cdb8f46a5cfe X-Virus-Checked: Checked by ClamAV on apache.org On Jan 6, 2008 11:42 PM, Alexander Saint Croix <kwalker@example.com> wrote: > Dain mentioned that I might completely drop and restart OpenEJB between > tests. He also mentioned that OpenJPA might have a way to wipe the database > tables clean for a given persistence unit. Here's one possible solution for you - the usage of in-memory db and <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='add,deleteTableContents')" />. Until an em is in use the tables are there in db. Once it's closed, at openejb shutdown, the tables will get dropped automatically. You may also want to remove the target directory where the db sits in. See http://www.jaceklaskowski.pl/wiki/Zasady_zapisu_zmian_do_bazy_danych_w_JPA#Konfiguracja_JPA_-_persistence.xml for some configuration settings. The article is about how entity changes are persisted in db using different jpa providers and is written in Polish, but the configuration files should be well-understandable by non-Polish speakers too. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl From kwalker@example.com Mon Jan 07 00:10:14 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 16425 invoked from network); 7 Jan 2008 00:10:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Jan 2008 00:10:14 -0000 Received: (qmail 63405 invoked by uid 500); 7 Jan 2008 00:10:03 -0000 Delivered-To: kwalker@example.com Received: (qmail 63391 invoked by uid 500); 7 Jan 2008 00:10:03 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 63382 invoked by uid 99); 7 Jan 2008 00:10:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 16:10:03 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO hs-out-2122.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 00:09:38 +0000 Received: by hs-out-2122.google.com with SMTP id j58so6089326hsj.11 for <kwalker@example.com>; Sun, 06 Jan 2008 16:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=U9vLEzT26Qxbal0AXq2CP+UGRKMLfo9r/1gwRWamcHQ=; b=iKoa9+wI77Av21gh+bS1qGTLlCC1FIFBeen4XJlhTJd2AJYCu133eMPUiYrgYHkIfj7JdaqILyNb2M8tDEoxH/J83HeOLPPrfJumw6NATisHtPSMtN58xuqVlh5cz5U6W20T6+XVqPwoKkmVUy+nAc/sscUNigN1V5JRP33gD+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YHUlztAxfT9MdIH6CmoaWjwan3rHcGEuavLwR51Oub+aUPfLtnU6zruW2aiBAC2IB/ICXRw550Fn5MEIUJD0mPTH4xbvZDT1HPXtFIG2+JISyXR8ETnueX53iHbE1CMV2OvKEafwSQUfOSIjRug4XDMBv2hCZ2t8C/FQr43UsyU= Received: by 83.161.120.155 with SMTP id q7mr5239195ybi.82.1199664582902; Sun, 06 Jan 2008 16:09:42 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 16:09:42 -0800 (PST) Message-ID: <kwalker@example.com> Date: Sun, 6 Jan 2008 18:09:42 -0600 From: "Alexander Saint Croix" <kwalker@example.com> To: kwalker@example.com, kwalker@example.com Subject: Re: Nuking tables on tearDown() for CRUD tests In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15307_212032.1199664582913" References: <kwalker@example.com> <kwalker@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_15307_212032.1199664582913 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Jacek, Thank you very much for the reply. I am using an in-memory db, and I tried the property below with no success. Because the db is in memory, there's nothing to delete in the file system. Cheers, -- Alex On Jan 6, 2008 5:44 PM, Jacek Laskowski <kwalker@example.com> wrote: > On Jan 6, 2008 11:42 PM, Alexander Saint Croix > <kwalker@example.com> wrote: > > > Dain mentioned that I might completely drop and restart OpenEJB between > > tests. He also mentioned that OpenJPA might have a way to wipe the > database > > tables clean for a given persistence unit. > > Here's one possible solution for you - the usage of in-memory db and > <property name="openjpa.jdbc.SynchronizeMappings" > value="buildSchema(SchemaAction='add,deleteTableContents')" />. Until > an em is in use the tables are there in db. Once it's closed, at > openejb shutdown, the tables will get dropped automatically. You may > also want to remove the target directory where the db sits in. > > See > http://www.jaceklaskowski.pl/wiki/Zasady_zapisu_zmian_do_bazy_danych_w_JPA#Konfiguracja_JPA_-_persistence.xml > for some configuration settings. The article is about how entity > changes are persisted in db using different jpa providers and is > written in Polish, but the configuration files should be > well-understandable by non-Polish speakers too. > > Jacek > > -- > Jacek Laskowski > http://www.JacekLaskowski.pl > ------=_Part_15307_212032.1199664582913-- From kwalker@example.com Mon Jan 07 06:19:08 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 77949 invoked from network); 7 Jan 2008 06:19:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Jan 2008 06:19:08 -0000 Received: (qmail 64718 invoked by uid 500); 7 Jan 2008 06:18:57 -0000 Delivered-To: kwalker@example.com Received: (qmail 64699 invoked by uid 500); 7 Jan 2008 06:18:56 -0000 Mailing-List: contact kwalker@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:kwalker@example.com> List-Unsubscribe: <mailto:kwalker@example.com> List-Post: <mailto:kwalker@example.com> List-Id: <users.openejb.apache.org> Reply-To: kwalker@example.com Delivered-To: mailing list kwalker@example.com Received: (qmail 64690 invoked by uid 99); 7 Jan 2008 06:18:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jan 2008 22:18:56 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwalker@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ag-out-0708.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 06:18:44 +0000 Received: by ag-out-0708.google.com with SMTP id 33so2108120agc.0 for <kwalker@example.com>; Sun, 06 Jan 2008 22:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=lcHuBM0a9OkwZPJRz9vdPm6tBRCEbkwQ7gFwMo4u7i4=; b=qmB+mP28B5DPKDEfvdtm6RacCJY+344rPqbe7gseT6SpG0jRY5A3ZUUddl+VliGBvRPJI2TCpdg7lrOG4nVVYllvqMYrERE3KBLH6rPmdxjoOw+1PpgpoC/uTRrai6mxktaRigx8FHm7kcdJB3pJTQukCG+fklxqOGDXP5vY/5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=wne71gkHAlILC8jJcJcBvl9/Ra53191KyNJB8R5QHWi0WtLF+dGXi6vlJXM0Kzbih6dqJCaLtJsQjhGEDVOVzAaUAAuReFko5PGeQ24wH+VWBnzVRtscshOg0sz+fisueNuxRVAEzpzPq2OPCft9wg8505+NgugwMrHqxBxxz8Y= Received: by 83.161.120.155 with SMTP id j12mr3395146ybf.124.1199686716335; Sun, 06 Jan 2008 22:18:36 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Jan 2008 22:18:36 -0800 (PST) Message-ID: <kwalker@example.com> Date: Mon, 7 Jan 2008 00:18:36 -0600 From: "Alexander Saint Croix" <kwalker@example.com> To: kwalker@example.com, kwalker@example.com Subject: Re: Nuking tables on tearDown() for CRUD tests In-Reply-To: <kwalker@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18974_25633998.1199686716326" References: <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> <kwalker@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_18974_25633998.1199686716326 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'll ask the OpenEJB guys if this is possible. Cheers, -- Alex On Jan 6, 2008 7:46 PM, Pinaki Poddar <kwalker@example.com> wrote: > > This error is related to dynamic runtime enhancement (my guess). If you > can, > switch to build-time enhancement, to verify this guess. > -- > View this message in context: > http://www.nabble.com/Nuking-tables-on-tearDown%28%29-for-CRUD-tests-tp14655065p14657182.html > Sent from the OpenJPA Users mailing list kwalker@example.com. > > ------=_Part_18974_25633998.1199686716326-- From kwalker@example.com Mon Jan 07 19:17:40 2008 Return-Path: <kwalker@example.com> Delivered-To: kwalker@example.com Received: (qmail 83536 invoked from network); 7 Jan 2008
{'source': 'Apache Software Foundation Public Mail Archives'}