2 Replies Latest reply on Jan 20, 2006 4:50 AM by Bruno Van Den Bossche

    LoggerPluginWriter prevents serialization from object acquir

    Bruno Van Den Bossche Newbie

      Hello all,

      I'v written a JCA (1.5) which will listen for SIP Messages comming in from the network. For this I used the JAIN SIP stack (https://jain-sip.dev.java.net/) and wrapped it in the RA.
      I transform each incomming message (transformed into event) is then sent to the MDBs registered for processing.

      All is well and this seems to be working just fine. The SIP-event gives acces to a Dialog, which represents the SIP-Session in action. If I try to store this Dialog object in an entity bean I get an error about serialization.
      I reported about this in the Persistence,JBoss/CMP, Hibernate, Database forum in the following topic: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74090

      Serializing the dialog in a stand alone application works just fine, and gives no errors. Serializing it from within JBoss gives me problems. (a more detailed description can be found in the mentioned post). In short, the problem is there when I try to write the Dialog to an outputstream from within JBoss.
      And the cause of this problem seems to be the "org.jboss.logging.util.LoggerPluginWriter"

      I downloaded the 4.0.3 src tarball and made a small modification which solves the problem (I prevent the LoggerPluginWriter from being used):

      --- jboss-4.0.3-src-unchanged/jboss-4.0.3-src/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java 2005-08-06 22:24:14.000000000 +0200
      +++ jboss-4.0.3-src/jboss-4.0.3-src/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java 2005-12-19 19:58:23.292313500 +0100
      @@ -40,7 +40,6 @@
      
       import org.jboss.deployment.DeploymentException;
       import org.jboss.logging.Logger;
      -import org.jboss.logging.util.LoggerPluginWriter;
       import org.jboss.mx.util.JMXExceptionDecoder;
       import org.jboss.mx.util.MBeanServerLocator;
       import org.jboss.resource.JBossResourceException;
      @@ -343,17 +342,8 @@
       // Give it somewhere to tell people things
       String categoryName = poolingStrategy.getManagedConnectionFactory().getClass().getName() + "." + jndiName;
       Logger log = Logger.getLogger(categoryName);
      - PrintWriter logWriter = new LoggerPluginWriter(log.getLoggerPlugin ());
      - try
      - {
      - poolingStrategy.getManagedConnectionFactory().setLogWriter(logWriter);
      
      - }
      - catch (ResourceException re)
      - {
      - log.warn("Unable to set log writer '" + logWriter + "' on " +
      - "managed connection factory", re);
      - log.warn("Linked exception:", re.getLinkedException());
      - }
      +
      +
       }
      
       protected void stopService()
      


      I had a look in the JIRA-system, and could not find any relevant reports.
      Could someone confirm this is either a JBoss bug or a problem with my code.

      I am reporting this problem here as well as the problem is situated in the package org.jboss.resource.connectionmanager.

      Kind Regards,
      Bruno