i can get ejb ref
{
Object ejbHome = ctx.lookup("interest/interest");
}
execute success.
but lookup datasource ,always catch exception
Test.java
{
...
System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.factory.url.pkgs", "org.jnp.interfaces");
System.setProperty("java.naming.provider.url", "localhost");
InitialContext ctx = new InitialContext();
Object ejbHome = ctx.lookup("interest/interest");
Object obj = ctx.lookup("java:/DefaultDS");
...
}
JBoss3.0/server/default/conf/standardjaws.xml
java:/DefaultDS
<type-mapping>Hypersonic SQL</type-mapping>
....
exception message:
javax.naming.NameNotFoundException: DefaultDS not bound
thank u for your answer.
:)
Hi,
Have a look at:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ have exactly the same problem and i'm still working on it.
Good luck,
Maarten