You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Jesse Farinacci <ji...@gmail.com> on 2012/10/16 21:56:33 UTC
TomEE 1.5 and JNDI Resources
Greetings,
I have looked around but am not having much luck. I would like to see
some example of using TomEE for test and production, with JNDI
injected resources for things like javax.sql.DataSource.
In test, Arquillian should be used with something like in-memory Apache Derby.
In production, whatever TomEE has defined in its configuration,
hopefully some connection pooled filesystem Apache Derby.
Would someone please point me in the right direction, please? I think
this would be valuable to me and others,
Thanks,
-Jesse
--
There are 10 types of people in this world, those
that can read binary and those that can not.
Re: TomEE 1.5 and JNDI Resources
Posted by Romain Manni-Bucau <rm...@gmail.com>.
well typically in prod you'll provide a tomee.xml with
<Resource type="DataSource" id="foo">
JdbcDriver = ...
UserName = ...
....
</Resource>
and in arquillian you'll provide in arquillian.xml:
<property name="properties">
foo = new://Resource?type=DataSource
foo.JdbcDriver = ...
foo.JdbcUrl = jdbc:hsqldb:mem:foo
....
</property>
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2012/10/16 Jesse Farinacci <ji...@gmail.com>
> Greetings,
>
> On Tue, Oct 16, 2012 at 3:59 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > resources.xml can work
> >
> > personally i use tomee.xml for prod and arquillian.xml (attribute
> > properties) to override it in tests
>
> I was actually hoping for a more complete example. Some of the links
> on the http://tomee.apache.org site are 404ing, including examples.
>
>
> http://validator.w3.org/checklink?uri=http%3A%2F%2Ftomee.apache.org%2Fexamples-trunk%2Findex.html&summary=on&hide_type=all&depth=&check=Check
>
> Also, there is no example using JNDI on that page anyway.
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
Re: TomEE 1.5 and JNDI Resources
Posted by Jesse Farinacci <ji...@gmail.com>.
Greetings,
On Tue, Oct 16, 2012 at 3:59 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> resources.xml can work
>
> personally i use tomee.xml for prod and arquillian.xml (attribute
> properties) to override it in tests
I was actually hoping for a more complete example. Some of the links
on the http://tomee.apache.org site are 404ing, including examples.
http://validator.w3.org/checklink?uri=http%3A%2F%2Ftomee.apache.org%2Fexamples-trunk%2Findex.html&summary=on&hide_type=all&depth=&check=Check
Also, there is no example using JNDI on that page anyway.
-Jesse
--
There are 10 types of people in this world, those
that can read binary and those that can not.
Re: TomEE 1.5 and JNDI Resources
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
resources.xml can work
personally i use tomee.xml for prod and arquillian.xml (attribute
properties) to override it in tests
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2012/10/16 Jesse Farinacci <ji...@gmail.com>
> Greetings,
>
> I have looked around but am not having much luck. I would like to see
> some example of using TomEE for test and production, with JNDI
> injected resources for things like javax.sql.DataSource.
>
> In test, Arquillian should be used with something like in-memory Apache
> Derby.
> In production, whatever TomEE has defined in its configuration,
> hopefully some connection pooled filesystem Apache Derby.
>
> Would someone please point me in the right direction, please? I think
> this would be valuable to me and others,
>
> Thanks,
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>