Patches item #492167, was opened at 2001-12-12 11:44
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=492167&group_id=22866
Category: JBossMQ
Group: v2.4 BETA (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Larry Sanderson (lsanders)
Assigned to: Nobody/Anonymous (nobody)
Summary: jdbc Persitant Manager failure
Initial Comment:
The org.jboss.mq.pm.jdbc.PersistenceManager fails to
load in the current 2.4.4 release... It attempts to
obtain a Datasource during the MBean initialization
phase, but the datasources are not bound to the JNDI
tree until the start phase.
This has been remedied in the 3.0 releases, but there
are package structure changes that make those fixes
inappropriate for 2.4. This patch incorporates the
changes without affecting the import statements.
=======================================================
============
RCS
file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/pm/j
dbc/PersistenceManager.java,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 PersistenceManager.java
---
src/main/org/jboss/mq/pm/jdbc/PersistenceManager.java
2001/08/23 03:57:11 1.2.2.1
+++
src/main/org/jboss/mq/pm/jdbc/PersistenceManager.java
2001/12/12 19:31:22
@@ -9,6 +9,7 @@
import java.net.URL;
import java.sql.*;
+import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -95,19 +96,28 @@
public void initService()
throws Exception {
- //Get an InitialContext
- InitialContext ctx = new InitialContext();
- datasource = ( DataSource )ctx.lookup(
jmsDBPoolName );
- txLog = new TxLog( datasource );
-
JMSServer server = ( JMSServer )getServer
().invoke( new ObjectName(
org.jboss.mq.server.JBossMQServiceMBean.OBJECT_NAME ),
"getJMSServer", new Object[]{}, new String[]{} );
server.setPersistenceManager( this );
-
}
public void startService()
throws Exception {
+ //Get an InitialContext
+ InitialContext ctx = new InitialContext();
+ datasource = ( DataSource )ctx.lookup(
jmsDBPoolName );
+ txLog = new TxLog( datasource );
+
+ // fix up all the LogInfo objects on the log
queue
+ for (Iterator iter = messageLogs.entrySet
().iterator(); iter.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)iter.next();
+ String key = (String)entry.getKey();
+ LogInfo info = (LogInfo)entry.getValue();
+ MessageLog log = info.log;
+ log.datasource = datasource;
+ }
+
JMSServer server = ( JMSServer )getServer
().invoke( new ObjectName(
org.jboss.mq.server.JBossMQServiceMBean.OBJECT_NAME ),
"getJMSServer", new Object[]{}, new String[]{} );
restore( server );
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=492167&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development