db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl <thomas.vand...@tewisoft.de>
Subject Re: ECM Issue (Was: Re: [jira] Resolved: (TORQUE-68) DatabaseMap remains empty if Torque is stopped and restarted, causes NPEs)
Date Tue, 17 Apr 2007 08:01:56 GMT
Hi Scott,

Thomas Vandahl wrote:

> Scott, would you please check the following for me: Remove the 
> SingleThreaded entry from the implements line of TorqueComponent and if 
> that doesn't help, replace it with ThreadSafe. Then check again.

After looking at the decommission() method in

http://svn.apache.org/viewvc/excalibur/tags/excalibur-component-2.1-Release/deprecated/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentFactory.java?revision=264009&view=markup

I'm pretty sure that marking TorqueComponent as ThreadSafe again would 
cure the problem. In the method code attached you can see the log 
message you observed and a call to

ContainerUtil.dispose( decommissionComponent );

which is exactly what happens.

Please check the change nevertheless, to be sure.

Bye, Thomas.


for reference:
---8<---
     public void decommission( final Object component )
         throws Exception
     {
         if( getLogger().isDebugEnabled() )
         {
             getLogger().debug( "ComponentFactory decommissioning 
instance of " +
                                m_componentClass.getName() + "." );
         }

         // See if we need to unwrap this component.  It may have been 
wrapped in a proxy
         //  by the ProxyGenerator.
         Object decommissionComponent = m_componentProxies.remove( 
component );
         if ( null == decommissionComponent )
         {
             // It was not wrapped.
             decommissionComponent = component;
         }

         ContainerUtil.stop( decommissionComponent );
         ContainerUtil.dispose( decommissionComponent );

         /*if ( decommissionComponent instanceof Composable )
         {
             // A proxy will have been created.  Ensure that components 
created by it
             //  are also released.
             ((ComponentManagerProxy)m_composableProxies.remove( 
decommissionComponent )).
                 releaseAll();
         }

         if ( decommissionComponent instanceof Serviceable )
         {
             // A proxy will have been created.  Ensure that components 
created by it
             //  are also released.
             ((ServiceManagerProxy)m_serviceableProxies.remove( 
decommissionComponent )).
                 releaseAll();
         }*/
     }


---8<---


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message