aSource ds = (DataSource) ctx.lookup("jdbc/MyDS");
> Connection con = ds.getConnection("OpenBill","OpenBill");
> // up to this point, nether ds or con are null, which is fine.
> con.prepareStatement("SELECT * FROM MyTable"); //
> NullPointerException happens here.
>
> The same code works fine in a servlet (my web.xml also setup correctly).
>
> cheers
> romen
>
>
--
Peng Yong Email: [EMAIL PROTECTED]
Bentium Ltd. URL: http://www.cn99.com
n closes. You could recover
> by using EJBObject.getHandle() and then using handle.getEJBObject(). That
> should be faster than doing the full JNDI lookup.
>
thks, i will try.
--
Peng Yong Email: [EMAIL PROTECTED]
Bentium Ltd. URL: http://www.cn99.com
time?
--
Peng Yong Email: [EMAIL PROTECTED]
Bentium Ltd. URL: http://www.cn99.com