"jaikiran" wrote : You will first have to lookup the datasource using the JNDI API. Then you can call the getConnection API on the DataSource. Just an example:
|
| | DataSource ds = (DataSource) new InitialContext().lookup("java:myDS");
| | ds.getConnection();
i wrote the database connection in oracle-ds.xml file and placed in deploy folder and DataSource ds = (DataSource) new InitialContext().lookup("java:myDS");
ds.getConnection();
but i didn't get the connection what should i do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198842#4198842
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198842
I have a similar problem and can't find a solution either. I looked through the ejb3.0 tutorials and the documentation but did not find a hint. I try to access a bean from a war but get the classcastexception no matter what i do (i put everything into alles.ear but get the same result).
Does this listing look correct?
RaumklimaWorkflow
| org.jnp.interfaces.NamingContext
|
| local
| $Proxy288
|
|
| remote
| $Proxy286
This code fails:
ctx = new InitialContext();
| Object obj = ctx.lookup("alles/RaumklimaWorkflow/remote");
| raumklima = (RaumklimaWorkflow)obj;
I'd really like to fix this error on my own but i simply don't no where else to search ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198840#4198840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198840