This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Originally posted by Jaikiran Pai: How have you setup your datasource? What exception are you seeing if any? And please post the code where you are doing the lookup.
Data Source is set up in properties.xml of Jboss (path is \jboss-4.2.0\server\default\deploy\container.war\manifest) the code in properties.xml is <?xml version="1.0" encoding="UTF-8"?> <config> <iface> .............. some other code <xmlpath>:/jboss-4.2.0/server/default/deploy/container.war/manifest</xmlpath> <ds-datasource>java:/PostgresDS</ds-datasource> <dc-datasource>java:/PostgresDS</dc-datasource> <du-datasource>java:/PostgresDS</du-datasource> </iface> </config>
and the code in JAVA for lookup is .........(This is called to authenticate the Login/Password)
You will have to provide us more details. When you say, you are not able to connect to the database, what exactly are you seeing? Any exceptions? Also, the xml file that you posted is not the datasource file. The datasource file will be present in the deploy folder and its name will end with -ds.xml. Can you post the contents of that file?