You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro <na...@gmail.com> on 2013/02/18 18:04:33 UTC
where put the file resources.xml into a netbeans progect?
hi . i try many times to configure a datasource for a web application .
I not would that it is visble at alll web application deployed.
So i have read that it is possible declre the db int oa file resources.xml
for only the speficified web application .
But where i have t oput it?
the content of the file resources.xml it is :
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<Resource id="MyDataSource" type="javax.sql.DataSource">
JdbcDriver org.hsqldb.jdbcDriver
JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
UserName sa
Password
JtaManaged true
</Resource>
<Resource id="MyUnmanagedMyDataSource" type="javax.sql.DataSource">
JdbcDriver org.hsqldb.jdbcDriver
JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
UserName sa
Password
JtaManaged false
</Resource>
</resources>
but i not understand where put it with netbeans project.
mauro
--
View this message in context: http://openejb.979440.n4.nabble.com/where-put-the-file-resources-xml-into-a-netbeans-progect-tp4660890.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: where put the file resources.xml into a netbeans progect?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Depend where you do the lookup.
Generally you inject it through @Resource(name="namedds") but you can
lookup it in java:openejb/Resource/... too
Le 20 févr. 2013 06:39, "mauro" <na...@gmail.com> a écrit :
> escuse me .
> butg for get the datasource i have to call with
> lookup("java:/comp/env/namedatasource) ????
>
> or java:/global/namedatasource?
>
> 3) you have a simple progect with netbeans with a resources.xml into it?
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/where-put-the-file-resources-xml-into-a-netbeans-progect-tp4660890p4660903.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: where put the file resources.xml into a netbeans progect?
Posted by mauro <na...@gmail.com>.
escuse me .
butg for get the datasource i have to call with
lookup("java:/comp/env/namedatasource) ????
or java:/global/namedatasource?
3) you have a simple progect with netbeans with a resources.xml into it?
--
View this message in context: http://openejb.979440.n4.nabble.com/where-put-the-file-resources-xml-into-a-netbeans-progect-tp4660890p4660903.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: where put the file resources.xml into a netbeans progect?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
1) it should be placed in WEB-INF
2) it is still visible to all applications (for next versions - 1.6.0
surely - some basic separation is tried to be ensured but basically you
declare a resource as in tomee.xml in a sub jndi tree)
*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*
2013/2/18 mauro <na...@gmail.com>
> hi . i try many times to configure a datasource for a web application .
> I not would that it is visble at alll web application deployed.
> So i have read that it is possible declre the db int oa file resources.xml
> for only the speficified web application .
>
> But where i have t oput it?
>
> the content of the file resources.xml it is :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <resources>
>
>
> <Resource id="MyDataSource" type="javax.sql.DataSource">
> JdbcDriver org.hsqldb.jdbcDriver
> JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
> UserName sa
> Password
> JtaManaged true
> </Resource>
>
>
> <Resource id="MyUnmanagedMyDataSource" type="javax.sql.DataSource">
> JdbcDriver org.hsqldb.jdbcDriver
> JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
> UserName sa
> Password
> JtaManaged false
> </Resource>
>
> </resources>
>
> but i not understand where put it with netbeans project.
>
> mauro
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/where-put-the-file-resources-xml-into-a-netbeans-progect-tp4660890.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>