logo       

Re: Facing "xaRes not enlisted" problem in MDB.: msg#00201

java.jboss.user

Subject: Re: Facing "xaRes not enlisted" problem in MDB.

> Sorry if this has been discussed previously.
> We are using some Message Driven Beans that need direct access to DB (for
mostly reading).
>
> May be we are doing something wrong... Please help!!!
>
> we acquire the database connection through JNDI
> DataSource ds = ctx.lookup("java:/DefaultDS");
> Connection con = ds.getConnection();
>
> /// use it
> con.close();

[snip stack trace]

> Could anyone tell us how to acquire a database connection?
> Can it be cached? Can the datasource be cached?

the datasource can be cached, the connection should be closed at the end of
every message. you appear to be doing things ok to me...

cheers
dim

>
> many thanks
>
> Benoit.
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Caffeinated soap. No kidding.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> JBoss-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise