Seems Castor support broke for JBoss 2.4.4, so the jar files were just 
yanked from the website without a word, despite a few questions from 
users.  I keep getting bad vibes about the viability of castor, things 
like this don't help.  Fortunately, I've only converted two of my EJB's 
to castor when this happened, so it won't be too much work to back track.

In the meantime, I've checked out the castorjdo plugin for JBoss and 
updated it so that it will compile and run under JBoss 2.4.4. 
 Basically, I wrote a specialized java.io.Writer that encapsulates an 
org.jboss.logging.Logger in the org.jboss.jdo.castor package for the 
CastorJDO MBean.  That class is attached.  Then changes are made to 
CastorJDOImpl.java to instanciate this class for getPrintWriter, patches 
are attached.  I've done some basic testing under 2.4.4, it compiles and 
runs without generating exceptions and JDO functionality works.

YMMV

Cheers
Chris

Attachment: LogWriter.java
Description: java/

Index: CastorJDOImpl.java
===================================================================
RCS file: 
/cvsroot/jboss/contrib/castorjdo/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v
retrieving revision 1.12
diff -u -r1.12 CastorJDOImpl.java
--- CastorJDOImpl.java  2001/10/25 21:28:19     1.12
+++ CastorJDOImpl.java  2002/01/08 21:51:16
@@ -36,9 +36,6 @@
 import org.exolab.castor.persist.spi.LogInterceptor;
 import org.exolab.castor.xml.Unmarshaller;
 
-import org.jboss.logging.Log;
-import org.jboss.logging.Logger;
-import org.jboss.logging.LogWriter;
 import org.jboss.util.ServiceMBeanSupport;
 
 import org.jboss.proxy.Proxy;
@@ -327,12 +324,12 @@
 
 
     public void exception(Exception except) {
-        log.exception(except);
+        log.error(except.toString());
     }
 
     public PrintWriter getPrintWriter() {
         if (writer == null) {
-            writer = new LogWriter(log);
+            writer = new PrintWriter( new LogWriter(log) );
         }
         return writer;
     }

Reply via email to