"genman" wrote : BTW, if you close the connection it closes the session and
sender as well.
I know :-)
"genman" wrote :
| Anyway, what does getConnection() do? Are you using the pooled connections
at java:/JmsXA ?
It gets the connection and start it from the connectionfactory (of the remote
server) and because it is remote it looks for XAConnectionfactory.
The code:
private Connection getConnection() throws JMSException {
|
| Connection connection = null;
| try {
| connection = cf.createConnection();
| connection.start();
|
| } catch (JMSException e) {
| if (connection != null)
| try {
| connection.close();
| } catch (Exception ignore) {
| }
| throw e;
| }
| return connection;
| }
And during ejb create the remote jndi lookup for the connectionfactory is done:
public void ejbCreate() {
| try {
| //remote jndi properties like port and url
| Properties prop = IMConstants.getIMServerProperties();
|
| Context ic = new InitialContext(prop);
|
| cf = (ConnectionFactory)
ic.lookup("XAConnectionFactory");
| sendQueue = (Queue)
ic.lookup(IMConstants.QUEUE_INCOMINGSYNCREQUESTS);
| ic.close();
| } catch (Exception e) {
| throw new EJBException("Failure to get connection
factory or queue: "
| + e.getMessage(),e);
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997183#3997183
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997183
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user