// tell the thread pool to run code that examines the current resource and destroys it if it is expired
m_reaperThreadPool.execute( new Runnable( )
{
public void run( )
{
TerminationTimeDocument termTimeXmlBean = null;
try
{
SOAPElement[] soapEle =
resource.getResourceProperty( ResourceLifetime11Constants.RESOURCE_PROP_QNAME_TERMINATION_TIME );
termTimeXmlBean = (TerminationTimeDocument) XmlBeansUtils.toXmlObject( soapEle[0] );
}
catch ( Throwable t )
{
m_noTerminationTimeSupport.put( resource.getId( ),
resource.getId( ) );
}
if ( ( termTimeXmlBean != null )
&& !termTimeXmlBean.isNilTerminationTime( )
&& termTimeXmlBean.getTerminationTime( ).before( Calendar.getInstance( ) ) )
{
try
{
resource.destroy( );
}