[Management, JMX/JBoss] - Wrong implementation of "compareOid" method in RequestHandle
by emailmsgbox
The implementation states in its Javadoc:
@return 0 when equal, 1 if oid2 > oid1 and -1 if oid1>oid2
However, the implementation is wrong in its code:
int res;
int nd1 = countDots(oid1);
int nd2 = countDots(oid2);
res = nd1 - nd2;
if (res != 0) // different number of dots -> not equal
return res;
while it is true that a different number of dots means that OID(s) are not equal, it is most definitely NOT true that OID1 < OID2 if it is shorter. What matters is the VALUE of the FIRST non-matching OID component - e.g.:
1.2.4.1.1 < 1.3.6 even though 1.3.6 is the shorter OID
the correct implementation is to go component by component untill the first non-equal value is found. If one of the OID(s) is "exhausted" (i.e., it is a prefix of the other) then the shorter one comes first.
This mis-implementation causes a BUG in SNMP GETNEXT behavior as it returns WRONG OID(s). In this context, "compareOid" should be used to find the first OID that is GREATER than the requested one and NOT less than - as is currently the (wrong) implementation of the "getNextOid" method.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967751#3967751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967751
19 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - Problem with datasource
by rocksayz
i am using oracle data source and it was working fine but suddenly this error prompted after a month
[JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e6899[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@7103af handles=0 lastUse=1156519380593 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1a8ecf4 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@15c9f9d xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1f33bb0 txSync=null]org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: Connection reset) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:481)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:206)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:550)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.removeTimedOut(InternalManagedConnectionPool.java:415)
at org.jboss.resource.connectionmanager.IdleRemover$1.run(IdleRemover.java:81)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:395)
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:1046)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:202)
... 4 more
Please let me what is the solution for this
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967746#3967746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967746
19 years, 8 months