I have a client app and want to access the JDBC connection to use Jasperreports 
from the client. 

One way would be to configure the client with its own database settings that 
are just duplicated in my ...-ds.xml file. 

Instead I have heard you can do a JNDI lookup to retrieve a Datasource object? 
Can anyone give me any tips on what the JNDI name is for the datasource with 
the settings below? (Running jboss-4.0.5.GA)

persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
  | <persistence>
  |     <persistence-unit name="pos-em">
  |       <jta-data-source>java:/PostgresDS</jta-data-source>
  |       <properties>
  |               <property name="hibernate.hbm2ddl.auto" value="update"/>
  |       </properties>
  |     </persistence-unit>
  | </persistence>

postgres-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>PostgresDS</jndi-name>
  |     
<connection-url>jdbc:postgresql://127.0.0.1:5432/posejb3</connection-url>
  |     <driver-class>org.postgresql.Driver</driver-class>
  |     <user-name>postgres</user-name>
  |     <password>password</password>
  |       <metadata>
  |          <type-mapping>PostgreSQL 8.0</type-mapping>
  |       </metadata>
  |   </local-tx-datasource>
  | </datasources>

thanks


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997781#3997781

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997781
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to