Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7071

use-try-lock option in data source configuration files is ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: JBossAS-5.1.0.GA
    • Fix Version/s: 6.0.0.M4
    • Component/s: JCA service
    • Labels:
      None
    • Environment:

      Windows XP Professional V2002, service pack 3

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      This appears to work, but is admittedly a hack:
      Get the JBoss source
      Modify BaseWrapperManagedConnectionFactory to include another method:
      public void setUseTryLock(long useTryLock)

      { this.useTryLock = (int) useTryLock; }

      jar this and place the jar ahead of the other jars in the classpath (e.g. at JBOSS_HOME\common\lib )

      I added a static initializer block that does some logging, and that seems to indicate that it is getting loaded.

      Show
      This appears to work, but is admittedly a hack: Get the JBoss source Modify BaseWrapperManagedConnectionFactory to include another method: public void setUseTryLock(long useTryLock) { this.useTryLock = (int) useTryLock; } jar this and place the jar ahead of the other jars in the classpath (e.g. at JBOSS_HOME\common\lib ) I added a static initializer block that does some logging, and that seems to indicate that it is getting loaded.

      Description

      (FYI your "READ THIS BEFORE ENTERING NEW REPORTS" points to a "You caught us doing a little maintenance..." page, so pardon me if I missed something in procedure. )

      The data source configuration property "use-try-lock" is effectively ignored.
      This is because the value is defined in configuration as a long, but the object that is actually set on an

      org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory extends
      org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory

      This class defines it as taking an int, not a long:

      public void setUseTryLock(int useTryLock)

      As such, reflection in ManagedConnectionFactoryDeployment.setManagedConnectionFactoryAttribute() does not find the method and simply logs it at a trace level, so the value never gets set.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jesper.pedersen Jesper Pedersen
                  Reporter:
                  mjconstar Mike Conner
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: