[jboss-jira] [JBoss JIRA] Commented: (JBAS-7071) use-try-lock option in data source configuration files is ignored

Mike Conner (JIRA) jira-events at lists.jboss.org
Thu Jul 2 11:12:51 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBAS-7071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12474647#action_12474647 ] 

Mike Conner commented on JBAS-7071:
-----------------------------------

One other thing,  the documentation in the dtd (docs\dtd\jboss-ds_5_0.dtd) states:

<!-- Any configured timeout for internal locks on the resource adapter objects in milli-seconds

     The default is a 60 second timeout
     e.g. 5 minutes
     <use-try-lock>300000</use-try-lock>
-->

However, the code in BaseWrapperManagedConnection is actually is doing:

      try
      {
         if (lock.tryLock(tryLock, TimeUnit.SECONDS) == false)
            throw new SQLException("Unable to obtain lock in " + tryLock + " seconds: " + this);
      }

That is, the value represents seconds, not milliseconds.






> use-try-lock option in data source configuration files is ignored
> -----------------------------------------------------------------
>
>                 Key: JBAS-7071
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7071
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>    Affects Versions: JBossAS-5.1.0.GA
>         Environment: Windows XP Professional V2002, service pack 3
>            Reporter: Mike Conner
>            Assignee: Jesper Pedersen
>            Priority: Minor
>
> (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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list