[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java CastorJDOImplMBean.java
User: user57 Date: 02/04/07 01:07:23 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Removed: varia/src/main/org/jboss/jdo/castor CastorJDOImplMBean.java Log: o Using XDoclet to generate *MBean interfaces Revision ChangesPath 1.11 +319 -281 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- CastorJDOImpl.java24 Feb 2002 10:18:51 - 1.10 +++ CastorJDOImpl.java7 Apr 2002 09:07:23 - 1.11 @@ -45,323 +45,361 @@ /** - * Castor JDO support + * Castor JDO support. * - * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.10 $ + * @jmx:mbean name=jboss:type=Service,service=JDO,flavor=Castor + *extends=org.jboss.system.ServiceMBean + * + * @version tt$Revision: 1.11 $/tt + * @author Oleg Nitz ([EMAIL PROTECTED]) */ public class CastorJDOImpl extends ServiceMBeanSupport -implements DataObjects, ObjectFactory, Referenceable, Serializable, - CastorJDOImplMBean, MBeanRegistration, LogInterceptor { + implements DataObjects, ObjectFactory, Referenceable, Serializable, + CastorJDOImplMBean, MBeanRegistration, LogInterceptor { -private String _jndiName; + private String _jndiName; -private String _dbConf; + private String _dbConf; -private JDO _jdo = new JDO(); + private JDO _jdo = new JDO(); -private String _dataSourceName; - -private static HashMap _instances = new HashMap(); - -private transient PrintWriter writer; - -/** - * Do JDO classes should be loader by the global class loader - * (the same class loader as Castor classes)? - */ -private boolean _commonClassPath; - -/* - * True if user prefer all reachable object to be stored automatically. - * False (default) if user want only dependent object to be stored. - */ -private boolean _autoStore = false; - -/* - * True if user prefers application-server database pooling. - * False (default) if user wants a new connection for each invocation of - * getDatabase(). - */ -private boolean _dbPooling = false; - -public CastorJDOImpl() { -} - -public ObjectName getObjectName(MBeanServer server, ObjectName name) -throws javax.management.MalformedObjectNameException { -return new ObjectName(OBJECT_NAME+,name=+_jndiName); -} - -public String getName() { -return CastorJDO; -} - -public void startService() throws Exception { -org.exolab.castor.jdo.conf.Database database; -Unmarshaller unm; -int pos; -Method m; - -boolean debug = log.isDebugEnabled(); - -// Bind in JNDI -bind(new InitialContext(), java:/ + _jndiName, this); - -_jdo.setTransactionManager(java:/TransactionManager); -_jdo.setConfiguration(_dbConf); -unm = new Unmarshaller(org.exolab.castor.jdo.conf.Database.class); -database = (org.exolab.castor.jdo.conf.Database) unm.unmarshal(new InputSource(_dbConf)); -_jdo.setDatabaseName(database.getName()); -if (database.getJndi() != null) { -_dataSourceName = database.getJndi().getName(); -} -// Older Castor versions older don't have these methods, -// we'll use reflection for backward compatibility -//_jdo.setAutoStore(_autoStore); -//_jdo.setDatabasePooling(_dbpooling); -try { -// 0.9.4 -m = _jdo.getClass().getMethod(setAutoStore, - new Class[] {boolean.class}); -m.invoke(_jdo, new Object[] {new Boolean(_autoStore)}); -} catch (Exception ex) { -if (debug) - log.debug(couldn't invoke setAutoStore()); -} - -try { -// 0.9.3 -m = _jdo.getClass().getMethod(setDatabasePooling, - new Class[] {boolean.class}); -m.invoke(_jdo, new Object[] {new Boolean(_dbPooling)}); -} catch (Exception ex) { -if (debug) - log.debug(couldn't invoke setDatabasePooling()); -} -_instances.put(_jndiName, this); -if (debug) - log.debug(DataObjects factory for + _dataSourceName + bound to + _jndiName); -} - -public void stopService() { -// Unbind from JNDI -try { -new InitialContext().unbind(java:/ +
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: user57 Date: 02/02/24 02:18:51 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: o should have been in previous logging change Revision ChangesPath 1.10 +2 -2 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CastorJDOImpl.java5 Jan 2002 06:39:42 - 1.9 +++ CastorJDOImpl.java24 Feb 2002 10:18:51 - 1.10 @@ -36,7 +36,7 @@ import org.exolab.castor.persist.spi.LogInterceptor; import org.exolab.castor.xml.Unmarshaller; -import org.jboss.logging.log4j.CategoryWriter; +import org.jboss.logging.util.CategoryWriter; import org.jboss.system.ServiceMBeanSupport; import org.jboss.proxy.compiler.Proxy; @@ -48,7 +48,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: ejort Date: 02/01/04 22:39:42 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: Guarded debug logging Revision ChangesPath 1.9 +25 -12contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- CastorJDOImpl.java2001/12/07 15:50:55 1.8 +++ CastorJDOImpl.java2002/01/05 06:39:42 1.9 @@ -48,7 +48,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, @@ -103,6 +103,8 @@ int pos; Method m; +boolean debug = log.isDebugEnabled(); + // Bind in JNDI bind(new InitialContext(), java:/ + _jndiName, this); @@ -124,7 +126,8 @@ new Class[] {boolean.class}); m.invoke(_jdo, new Object[] {new Boolean(_autoStore)}); } catch (Exception ex) { -log.debug(couldn't invoke setAutoStore()); +if (debug) + log.debug(couldn't invoke setAutoStore()); } try { @@ -133,10 +136,12 @@ new Class[] {boolean.class}); m.invoke(_jdo, new Object[] {new Boolean(_dbPooling)}); } catch (Exception ex) { -log.debug(couldn't invoke setDatabasePooling()); +if (debug) + log.debug(couldn't invoke setDatabasePooling()); } _instances.put(_jndiName, this); -log.debug(DataObjects factory for + _dataSourceName + bound to + _jndiName); +if (debug) + log.debug(DataObjects factory for + _dataSourceName + bound to + _jndiName); } public void stopService() { @@ -281,43 +286,51 @@ // LogInterceptor implementation for Castor 0.8 -- public void loading(Class objClass, Object identity) { -log.debug( Loading + objClass.getName() + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Loading + objClass.getName() + ( + identity + ) ); } public void creating(Class objClass, Object identity) { -log.debug( Creating + objClass.getName() + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Creating + objClass.getName() + ( + identity + ) ); } public void removing(Class objClass, Object identity) { -log.debug( Removing + objClass.getName() + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Removing + objClass.getName() + ( + identity + ) ); } public void storing(Class objClass, Object identity) { -log.debug( Storing + objClass.getName() + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Storing + objClass.getName() + ( + identity + ) ); } // LogInterceptor implementation for Castor 0.9 -- public void loading(Object objClass, Object identity) { -log.debug( Loading + objClass + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Loading + objClass + ( + identity + ) ); } public void creating(Object objClass, Object identity) { -log.debug( Creating + objClass + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Creating + objClass + ( + identity + ) ); } public void removing(Object objClass, Object identity) { -log.debug( Removing + objClass + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Removing + objClass + ( + identity + ) ); } public void storing(Object objClass, Object identity) { -log.debug( Storing + objClass + ( + identity + ) ); +if (log.isDebugEnabled()) + log.debug( Storing + objClass + ( + identity + ) ); } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: mnf999 Date: 01/12/07 07:50:56 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: The proxy generation is in its own package Revision ChangesPath 1.8 +4 -4 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CastorJDOImpl.java2001/11/26 03:24:54 1.7 +++ CastorJDOImpl.java2001/12/07 15:50:55 1.8 @@ -39,16 +39,16 @@ import org.jboss.logging.log4j.CategoryWriter; import org.jboss.system.ServiceMBeanSupport; -import org.jboss.proxy.Proxy; -import org.jboss.proxy.Proxies; -import org.jboss.proxy.InvocationHandler; +import org.jboss.proxy.compiler.Proxy; +import org.jboss.proxy.compiler.Proxies; +import org.jboss.proxy.compiler.InvocationHandler; /** * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: starksm Date: 01/11/25 19:24:54 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: Drop the org.jboss.ejb.DeploymentException in favor of the org.jboss.deployment.DeploymentException class. Use the org.jboss.logging.Logger.getLogger factory method. Revision ChangesPath 1.7 +6 -4 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CastorJDOImpl.java2001/10/11 01:02:17 1.6 +++ CastorJDOImpl.java2001/11/26 03:24:54 1.7 @@ -48,7 +48,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, @@ -342,9 +342,11 @@ log.error(Exception, except); } -public PrintWriter getPrintWriter() { -if (writer == null) { -writer = new CategoryWriter(log); +public PrintWriter getPrintWriter() +{ +if (writer == null) +{ +writer = new CategoryWriter(log.getCategory()); } return writer; } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: starksm Date: 01/09/11 11:41:15 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: Convert all logging to org.jboss.logging.Logger which is a subclass of org.apache.log4j.Category. Revision ChangesPath 1.4 +4 -4 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CastorJDOImpl.java2001/09/01 19:50:29 1.3 +++ CastorJDOImpl.java2001/09/11 18:41:15 1.4 @@ -36,7 +36,7 @@ import org.exolab.castor.persist.spi.LogInterceptor; import org.exolab.castor.xml.Unmarshaller; -import org.jboss.logging.LogWriter; +import org.jboss.logging.log4j.CategoryWriter; import org.jboss.system.ServiceMBeanSupport; import org.jboss.proxy.Proxy; @@ -48,7 +48,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, @@ -304,12 +304,12 @@ public void exception(Exception except) { -log.exception(except); +log.error(Exception, except); } public PrintWriter getPrintWriter() { if (writer == null) { -writer = new LogWriter(log); +writer = new CategoryWriter(log); } return writer; } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: olegnitz Date: 01/09/11 13:51:32 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: jboss-Patches-459958 applied Revision ChangesPath 1.5 +2 -2 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CastorJDOImpl.java2001/09/11 18:41:15 1.4 +++ CastorJDOImpl.java2001/09/11 20:51:32 1.5 @@ -48,7 +48,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, @@ -122,7 +122,7 @@ public void stopService() { // Unbind from JNDI try { -new InitialContext().unbind(_jndiName); +new InitialContext().unbind(java:/ + _jndiName); } catch (NamingException e) { } } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java
User: kimptoc Date: 01/09/01 12:50:29 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java Log: remove deprecated logging import, where possible, otherwise comment as needing replacement with log4j must find out how it is use would be good if the deprecation message pointed to an example to use... Revision ChangesPath 1.3 +8 -10 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CastorJDOImpl.java2001/08/30 02:42:38 1.2 +++ CastorJDOImpl.java2001/09/01 19:50:29 1.3 @@ -4,7 +4,7 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - + package org.jboss.jdo.castor; import java.io.PrintWriter; @@ -36,8 +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.system.ServiceMBeanSupport; @@ -50,12 +48,12 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ -public class CastorJDOImpl extends ServiceMBeanSupport +public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, CastorJDOImplMBean, MBeanRegistration, LogInterceptor { - + private String _jndiName; private String _dbConf; @@ -87,7 +85,7 @@ throws javax.management.MalformedObjectNameException { return new ObjectName(OBJECT_NAME+,name=+_jndiName); } - + public String getName() { return CastorJDO; } @@ -163,7 +161,7 @@ public boolean getLoggingEnabled() { return (_jdo.getLogInterceptor() != null); } - + public void setCommonClassPath(boolean commonClassPath) { _commonClassPath = commonClassPath; } @@ -223,12 +221,12 @@ throws Exception { return _instances.get(name.toString()); } - + // Private --- private void bind(Context ctx, String name, Object val) throws NamingException { // Bind val to name in ctx, and make sure that all intermediate contexts exist - + Name n = ctx.getNameParser().parse(name); while (n.size() 1) { ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java CastorJDOImplMBean.java
User: mnf999 Date: 01/08/29 19:42:38 Modified:varia/src/main/org/jboss/jdo/castor CastorJDOImpl.java CastorJDOImplMBean.java Log: more package stuff Revision ChangesPath 1.2 +2 -2 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java Index: CastorJDOImpl.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CastorJDOImpl.java2001/08/01 00:39:59 1.1 +++ CastorJDOImpl.java2001/08/30 02:42:38 1.2 @@ -39,7 +39,7 @@ import org.jboss.logging.Log; import org.jboss.logging.Logger; import org.jboss.logging.LogWriter; -import org.jboss.util.ServiceMBeanSupport; +import org.jboss.system.ServiceMBeanSupport; import org.jboss.proxy.Proxy; import org.jboss.proxy.Proxies; @@ -50,7 +50,7 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public class CastorJDOImpl extends ServiceMBeanSupport implements DataObjects, ObjectFactory, Referenceable, Serializable, 1.2 +2 -2 contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImplMBean.java Index: CastorJDOImplMBean.java === RCS file: /cvsroot/jboss/contrib/varia/src/main/org/jboss/jdo/castor/CastorJDOImplMBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CastorJDOImplMBean.java 2001/08/01 00:39:59 1.1 +++ CastorJDOImplMBean.java 2001/08/30 02:42:38 1.2 @@ -11,10 +11,10 @@ * Castor JDO support * * @author Oleg Nitz ([EMAIL PROTECTED]) - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public interface CastorJDOImplMBean - extends org.jboss.util.ServiceMBean + extends org.jboss.system.ServiceMBean { public static final String OBJECT_NAME = :service=CastorJDO; ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development