Roman Brouk wrote:
> thanks for reply! why isn't it a correct way to access Datasource?
I'll repeat the answer I gave in the mail addressed to me directly
(please don't send mail directly to me and to the list).
See section 19.4 of the EJB spec and numerous discussions here on
jboss-user. Hint: java:comp/env/.
Toby.
>> try{
>> InitialContext jndiContext = new InitialContext();
>> javax.sql.DataSource ds = (javax.sql.DataSource)
>> jndiContext.lookup("java:/mySQLDS");
>> con = ds.getConnection();
>> }catch(Exception ex){
>> System.out.println("Looking for DataSource: " +
>> ex.getMessage());
>> }
>>
>>
>> I get message that mySQLDS is not bound.
>
>
> That's strange. What you're doing isn't the "correct" way for an EJB to
> access a DataSource, but it should work. Is this all using a single
> JBoss instance? What does the JNDIView MBean tell you (i.e. go to port
> 8082, find the JNDIView MBean, invoke the list operation)?
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user