Hi All again:
Actually I am running Jboss-2.4.4 and Tomcat-3.2.3. I am not using ejb beans so I don't have worry about jboss.xml, ejb-jar.xml etc. The only configure files for me to setup datasource are jboss.jcml and standardjaws.xml which are as following.(what else ?) If I need to configure my datasource's jndi name as "jdbc/DefaultDS". what I should modify? In jboss.jcml, we can configure Datasource name, Pool name. what about datasource jndi name. Thanks.
I am runing client application out of Jboss VM. So I need nothing to do with jboss.xml, ejb-jar.xml etc. I have two configuration files configured like:
Is any other configure file I need to take care? because those two files don't have jndi name for datasource, what is the client lookup statement: ctx.lookup("DefaultDS") or something else. If I need use jndi name like 'jdbc/MyDataSource'(using ctx.lookup("jdbc/MyDataSource"), what I should modify those two files. I am new to Jboss. Your help would be very much appreciated.
P.S.: (From java: namespace of JndiView, I can see DefaultDS, does that mean that jndi name is "DefaultDS". If it is true, I should have no problem to lookup ctx.lookup("DefaultDS") from out of Jboss or ctx.lookup("java:DefaultDS") from inside Jboss. Please point out if I am wrong)
If you look more closely at jndi view you will see that defaultDS is in the java: context. Therefore you must look it up as "java:/DefaultDS".
If you are not using ejbs or servlets you have to look it up this way, and jboss.jcml is the only configuration file that will be used.