Women in Technology

Hear us Roar



Article:
  Custom PMD Rules
Subject:   XPath rule to close JDBC resources
Date:   2005-02-28 04:31:29
From:   PravinD
Hello,


I am attempting to create a XPath rule that detects JDBC resources and pops an error if they are not closed inside the finally block. This rule should take care of all objects like resultsets, statements, preparedstatements, connection objects. For starters I would like to check for connection objects alone. If anyone has written such a rule or knows how the rule should be then please post the rule. Thanks in advance.


Pravin. D


P.S: Is it possible to write such a rule using XPath?

Full Threads Newest First

Showing messages 1 through 4 of 4.

  • XPath rule to close JDBC resources
    2005-02-28 06:06:37  tcopeland [View]

    Hi Pravin -

    Cool, I saw you copied this post over here as we discussed:

    http://sourceforge.net/forum/forum.php?thread_id=1238765&forum_id=188192

    so we'll chat over there...

    Yours,

    Tom
    • XPath rule to close JDBC resources
      2005-03-01 04:38:51  PravinD [View]

      Tom,

      I saw your reply in the sourceforge.net forum and I went through teh links you had given me there. However, I do not find adequate info on how to include this Close Connection rule into WSAD 5.0. Could you please tell me how I enable the design ruleset in WSAD 5.0?

      Regards,
      Pravin. D

      P.S: Sorry to be eating up your time! :-)
      • XPath rule to close JDBC resources
        2005-03-01 06:02:47  tcopeland [View]

        Hi Pravin -

        > how I enable the design ruleset in WSAD 5.0?

        Hm, you may want to ask that question on the PMD forums; I'm not a WSAD user, but folks there may be...

        > Sorry to be eating up your time! :-)

        No problemo! I'm sorry I can't give better answers to your questions; I usually run PMD from IntelliJ IDEA...

        Yours,

        Tom
        • XPath rule to close JDBC resources
          2005-03-01 21:41:14  PravinD [View]

          Tom,

          Sure I will post this query in the pmd forum. In case you do come acros the info i am looking for than pls do mail it to me at pravindevanathan@yahoo.com. Thanks mate!!!!

          Regards,
          Pravin. D