Return-Path: X-Original-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltaspike-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37528C67E for ; Sun, 6 May 2012 22:12:09 +0000 (UTC) Received: (qmail 93794 invoked by uid 500); 6 May 2012 22:12:09 -0000 Delivered-To: apmail-incubator-deltaspike-dev-archive@incubator.apache.org Received: (qmail 93760 invoked by uid 500); 6 May 2012 22:12:09 -0000 Mailing-List: contact deltaspike-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltaspike-dev@incubator.apache.org Delivered-To: mailing list deltaspike-dev@incubator.apache.org Received: (qmail 93752 invoked by uid 99); 6 May 2012 22:12:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 May 2012 22:12:09 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.82.109.193] (HELO nm24-vm2.bullet.mail.ird.yahoo.com) (212.82.109.193) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 06 May 2012 22:12:01 +0000 Received: from [77.238.189.50] by nm24.bullet.mail.ird.yahoo.com with NNFMP; 06 May 2012 22:11:39 -0000 Received: from [212.82.108.118] by tm3.bullet.mail.ird.yahoo.com with NNFMP; 06 May 2012 22:11:39 -0000 Received: from [127.0.0.1] by omp1027.mail.ird.yahoo.com with NNFMP; 06 May 2012 22:11:39 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 226962.60177.bm@omp1027.mail.ird.yahoo.com Received: (qmail 88598 invoked by uid 60001); 6 May 2012 22:11:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1336342298; bh=z2xODr4eOeUYyxpFw+KVNBKB1G8vBJOJ5QphQfVVnt8=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XnSnu8Fa5f+0pZ4+XyWxDHXv8SsunYrWMLcpPZXpE38OntJVkVWhjWCVfsLq/vP7U66IEy7iXSO3Fm8nDDGwFlWZawIAaqrmGc4L3IPJLfN9T4vf3BlmrjJzDLh7Hl8MhdKQhFMnzENFkxeme1mbsMmPCgnNMN+l8rYJM6pdNcU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nKisLi7ry7mtOHktdkzx5VunhAdIXHGKuayUp+gkFqFTTeCu4XGnGdVRmTDhCAY+XZ5WRprWJ27LGR1yx1NjFB2ZJibn4Gud+6wEVDbLhUgbpCGIYWVFmYlGFjx/p5OL2w/gFTQWJM0bptjipsccv+nFjci80XdxD5gzigk0nqE=; X-YMail-OSG: maJymuAVM1kpfV.Ci_0ak3zLLVNW6ZFaxaytQqciTivXhzL .WBa4oZBxuKN6tbb40c8KCkX3yGwbtGgkfBYvn8WOjKPdd3b6gTl5tN4pwoR .UABUalR04oVOuwQw2W1sViep3GPHo4UueIhVraRFigp03xc3Wh1mBctSjmd zU7s4bWsAOYUL4ENiB36CBIWJLRBBGNJL8NVs5SQW2cLNJ0f1Gu.qszHQsJR RCzFtnloFxpr_mCrjtRW3vHB5svzsZ_V7HpNGiVNldG3UQyC8VftoY_.d_kw _9pH29GGU9uSG7a6MaVSXAlg2xXtDa.muLY.fRytf80yPaEuYaVw6lNyJyNo J4G9lzYNMLzeG84g3vzwPQsQyPBB0JEsUSl34ts..SjtG9h2rEDjnvIwjDEM Ghp_X1r.K5hKFbPYOGNubsmjWZhPZlikjmA-- Received: from [89.26.109.209] by web171506.mail.ir2.yahoo.com via HTTP; Sun, 06 May 2012 23:11:38 BST X-Mailer: YahooMailWebService/0.8.117.340979 References: <1336161394.18186.YahooMailNeo@web171506.mail.ir2.yahoo.com> <1336256074.7979.YahooMailNeo@web171501.mail.ir2.yahoo.com> <0CDEF12E-81F5-4AC1-881F-D46EFE359FF3@gmail.com> <20120506091455.63736164642@mx01.openknowledge.de> <1336297074.71396.YahooMailNeo@web171506.mail.ir2.yahoo.com> <30B9F2A0-8D05-4052-86AA-3922E993B6B4@gmail.com> <1336304910.18504.YahooMailNeo@web171504.mail.ir2.yahoo.com> <3870ED98-65FF-4826-B3A6-03EF6C7035E4@gmail.com> Message-ID: <1336342298.88555.YahooMailNeo@web171506.mail.ir2.yahoo.com> Date: Sun, 6 May 2012 23:11:38 +0100 (BST) From: Mark Struberg Reply-To: Mark Struberg Subject: Re: [DISCUSS] deltaspike-jpa module features To: "deltaspike-dev@incubator.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi David!=0A=0AThanks for this valuable input!=0A=0AI guess I need to think= about that and put it up in a sample app to test it's usability.=0A=0AI al= ways need some piece of code to verify if it is _really_ working. =0A=0A=0A= Btw, are we still d'accord that we like to support EE5, EE6 and EE7 servers= with our stuff?=0AMaybe we could provide a 'legacy path' for EE5 and anoth= er one for EE6 and 7 servers?=0AWe should also make sure that this way does= work _without_ any EE server as well - means with pure JPA. Because that i= s was is used in most unit tests.=0A=0A=0ALieGrue,=0Astrub=0A=0A=0A=0A-----= Original Message -----=0A> From: David Blevins = =0A> To: deltaspike-dev@incubator.apache.org; Mark Struberg =0A> Cc: =0A> Sent: Sunday, May 6, 2012 10:47 PM=0A> Subject: Re: [DISC= USS] deltaspike-jpa module features=0A> =0A> =0A> On May 6, 2012, at 1:32 P= M, David Blevins wrote:=0A> =0A>> I recall your app and I'd guess the hear= t of your distaste is that you =0A> essentially configure two datasources a= nd then pick one at runtime.=0A>> =0A>> In static code, this is possible (= there is equivalent xml):=0A>> =0A>> =A0 =A0 @DataSourceDefinition(name =3D= "java:app/test/ds" ....)=0A>> =A0 =A0 @DataSourceDefinition(name =3D "java= :app/prod/ds" ....)=0A>> =A0 =A0 @Resource(name =3D "java:app/ds", =0A> loo= kup=3D"java:app/prod/ds")=0A>> =A0 =A0 public class SomeCdiBean {=0A>> =A0 = =A0 }=0A>> =0A>> Two datasources are declared and one symlink that the app= lication can use =0A> safely.=A0 Clearly the above "symlink" is still hardc= oded, so to get =0A> some more dynamic behavior you could potentially put t= he "@Resource" =0A> link on a separate class in a separate jar.=A0 Perhaps = a "prod.jar" to =0A> hold all the mappings for production and a "test.jar" = to hold all the =0A> mappings for test, then make sure only one of them is = in the application at any =0A> given time.=0A>> =0A>> Still limited of cou= rse as changing the archive is required and often that =0A> isn't allowed b= etween test and production.=0A> =0A> For the sake of completeness, I should= also say that swapping the descriptors =0A> out without modifying the arch= ive is the reason for the alternate deployment =0A> descriptor functionalit= y (alt-dd) all full profile certified servers support.=A0 =0A> So even that= concept has been addressed at the spec level.=0A> =0A> One of the things n= ot supported by plain Tomcat or Jetty, so also not commonly =0A> known or u= sed.=0A> =0A> =0A> -David=0A>