users@glassfish.java.net

Re: OracleXE, XADataSource, cannot get a Connection

From: <glassfish_at_javadesktop.org>
Date: Sat, 10 Jan 2009 14:16:25 PST

I don't use it anywhere else, that's the weird thing. I checked for that. Here is the snippet:

[code]
@Resource(mappedName = "jdbc/OracleXE")
private DataSource ds;

@Override
public void onMessage(Message msg) {
    Connection c = null;
    Statement s = null;
    try {
        TextMessage tmsg = (TextMessage) msg;
        String m = tmsg.getText();
        c = ds.getConnection(); // it fails at this point
        s = c.createStatement();
        ....
[/code]

szczyp
[Message sent by forum member 'szczyp' (szczyp)]

http://forums.java.net/jive/thread.jspa?messageID=325176