From: Jord S. <Jor...@eo...> - 2001-07-10 21:17:11
|
I have in jboss.jcml: <mbean code=3D"org.jboss.jdbc.XADataSourceLoader" name=3D"DefaultDomain:service=3DXADataSource,name=3DOracle"> <attribute name=3D"PoolName">Oracle</attribute> etc. etc. etc. </mbean> In my bean code, I do: DataSource ds; ds=3D(DataSource) ( ( new InitialContext() ).lookup("java:/Oracle") ); What is the exception that you get? -----Original Message----- From: Larry Kim [mailto:LarryKim@Wellogic.com] Sent: Tuesday, July 10, 2001 5:07 PM To: jbo...@li... Subject: [JBoss-user] trying to look up a datasource what am i doing wrong? this is my client: try { InitialContext initialContext =3D new InitialContext(); Object ref =3D initialContext.lookup( "DefaultDS"); // i have = also tried "java:/DefaultDS" =09 //that line causes an exception. I also tried: =09 //DataSource ds =3D (DataSource)PortableRemoteObject.narrow(ref, DataSource.class); //DataSource datasource =3D (DataSource) initialContext.lookup("java:/DefaultDS"); } catch (NamingException ne) { System.out.println("monster Booooyaaa!!! :( :( :("); System.out.println(ne); } _______________________________________________ JBoss-user mailing list JBo...@li... http://lists.sourceforge.net/lists/listinfo/jboss-user |