Hi!

I didn't find any way do detect deadlocks on JBoss but you can change your
jboss.xml to tell JBoss which methods do not need an EJB lock.

In each <entity> entry in jboss.xml file, do the following change (in this
example, get* methods are read-only):

<entity>
    <ejb-name>Role</ejb-name>
    <local-jndi-name>ejb/webflow/local/Role</local-jndi-name>
    <!-- this tells JBoss that the get* methods are read-only -->
    <method-attributes>
        <method>
            <method-name>get*</method-name>
            <read-only>true</read-only>
        </method>
    </method-attributes>
</entity>

I didn't find any XDoclet @tag to do this but I coded a XSLT transform:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

 <xsl:template match="@*|node()">
   <xsl:copy>
     <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
 </xsl:template>

 <xsl:template match="entity">
  <xsl:copy>
   <xsl:apply-templates/>
   <method-attributes>
    <method>
     <method-name>get*</method-name>
     <read-only>true</read-only>
    </method>
   </method-attributes>
  </xsl:copy>
 </xsl:template>

</xsl:stylesheet>

If you are using ant to build your project do something like this:

  <xslt in="${original.jboss.xml}" out="${modified.jboss.xml}"
style="${location.of.xslt.above}">
   <outputproperty name="method" value="xml"/>
   <outputproperty name="standalone" value="yes"/>
   <outputproperty name="encoding" value="iso8859_1"/>
   <outputproperty name="indent" value="yes"/>
   <xmlcatalog>
    <dtd publicId="-//JBoss//DTD JBOSS 3.0//EN"
location="${location.of.jboss.xml.dtd}"/>
   </xmlcatalog>
  </xslt>

The <xmlcatalog> tag above is optional. It's included here just to avoid a
remote connection for the xml validation.

I hope this helps.

Greetings from Brazil!

Mauricio


----- Original Message -----
From: "Hunter Hillegas" <[EMAIL PROTECTED]>
To: "JBoss User" <[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 5:00 PM
Subject: [JBoss-user] Deadlocks


> I am seeing some deadlocks in a CMP 2.0 app that I recently put into
> production on JBoss 3.0.4.
>
> 90% of my access with the entities is read only.
>
> What can I do to troubleshoot/track down these deadlocks and fix them?
>
> Any help is appreciated.
>
> Thanks,
> Hunter
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to