[JBoss JIRA] Created: (JBMESSAGING-511) JDBC and Transaction close/cleanup operations should be bullet-proofed JDBCChannelMapper and elsewhere.
by Joel Lindheimer (JIRA)
JDBC and Transaction close/cleanup operations should be bullet-proofed JDBCChannelMapper and elsewhere.
-------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-511
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-511
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.0.1.CR4
Environment: Windows
Reporter: Joel Lindheimer
Assigned To: Ovidiu Feodorov
I am concerned with object close and wrap.end() methods in JDBCChannelMapper possibly being bypassed if an exception is thrown in the rs.close(), ps.close() blocks (code below is an example of what is currently in the JDBCChannelMapper).
JDBCChannelMapper :
public DurableSubscription getDurableSubscription(String clientID, String subscriptionName, MessageStore ms, PersistenceManager pm, MemoryManager mm) throws Exception {
// Look in memory first
DurableSubscription sub = getDurableSubscription(clientID, subscriptionName);
if (sub != null) {
return sub;
}
//Now look in the db
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
TransactionWrapper wrap = new TransactionWrapper();
try {
conn = ds.getConnection();
ps = conn.prepareStatement(selectDurableSub);
(do stuff here... )
return sub;
} finally {
if (rs != null) { // JL what if it blose up here?
rs.close();
}
if (ps != null) { // JL or here?
ps.close();
}
if (conn != null) { // or here?
conn.close();
}
wrap.end();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBMESSAGING-916) CLONE -JDBCPersistenceManager and JDBCSupport do not close Statements
by jivkoto (JIRA)
CLONE -JDBCPersistenceManager and JDBCSupport do not close Statements
---------------------------------------------------------------------
Key: JBMESSAGING-916
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-916
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.0.1.GA, 1.2.0.Alpha2
Environment: JBoss 4.0.4 GA, Windows XP + SP2, MS SQL SERVER 2000
Reporter: jivkoto
Assigned To: Juha Lindfors
Priority: Minor
Fix For: 1.0.2.CR1
After starting jboss-messaging configured to use MS SQLServer2000 there a lots of mumbles that there are lots of statements that are left open.
10:38:32,265 WARN [WrappedConnection] Closing a statement you left open, please do your own housekeeping
java.lang.Throwable: STACKTRACE
The places where the statements are left open are:
org.jboss.jms.server.plugin.JDBCChannelMapper#createSchema
org.jboss.messaging.core.plugin.JDBCPersistenceManager#createSchema
Even if my report is for jboss-messaging 1.0.1.GA I checked the related places in jboss-messaging-1.2.0.Alpha2. And there is code such as conn.createStatement().executeUpdate(statement) too.
The places I found it are:
org.jboss.jms.server.plugin.JDBCJMSUserManager#insertUserRoleData
org.jboss.messaging.core.plugin.JDBCSupport#createSchema
Please close the statements. I hope that what I am reporting is useful for you.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBCACHE-832) Develop CacheSPI impl for use in JBoss JMX microkernel
by Brian Stansberry (JIRA)
Develop CacheSPI impl for use in JBoss JMX microkernel
------------------------------------------------------
Key: JBCACHE-832
URL: http://jira.jboss.com/jira/browse/JBCACHE-832
Project: JBoss Cache
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: 2.0.0.GA
If we want JBC 2.0 to work in AS 4.2, we'll need a way to construct a CacheSPI via the 4.x microkernel/SARDeployer.
Initial thoughts:
1) Create class "CacheSPIWrapper" that implements CacheSPI, plus exposes all the configuration-related mbean attributes from JBC 1.4. This is the class that's used for the "class" attribute of the mbean in the -service.xml file.
2) Class when instantiated also instantiates a Configuration object. When SARDeployer invokes the setters on the legacy mbean attributes, the values are passed through to the Configuration object.
3) In createService(), the Configuration object is passed to DefaultCacheFactory, which returns an instance of the standard CacheSPI impl. CacheSPIWrapper holds a ref to this object for use as a delegate.
4) CacheSPIWrapper implements CacheSPI by delegation to the standard object.
If we decide we don't want to support use of JBC 2.0 in 4.2, this task can be closed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month