"darranl" wrote : Where would your try catch statements go?  
  | Why did you strip them, they are a very important part of the code.  
  | Is your close in a finally block?
  | 
  | 

here it goes ...


  |         ConnectionFactory cFactory;
  |         
  |         ECSConnectionSpecImpl connectionSpec = new 
ECSConnectionSpecImpl("host", port);
  |         
  |         Connection conn = null;
  |         
  |         ECSInteractionSpec interactionSpec = new ECSInteractionSpec();
  |         RecordFactory rFactory = null;
  |         Interaction interaction = null;
  |         IndexedRecord input = null;
  |         
  |         try
  |         {
  |             conn = factory.getConnection(connectionSpec);
  |         } catch (ResourceException ex)
  |         {
  |             throw new RemoteException("unable to obtain connection from 
factory");
  |         }
  |         
  |         try
  |         {
  |             rFactory = factory.getRecordFactory();
  |             interaction = conn.createInteraction();
  | 
  |             input = rFactory.createIndexedRecord("noop");
  |             interactionSpec.setFunctionName(ECSInteractionSpec.CMD_NOOP);
  |             interaction.execute(interactionSpec, input);
  |             interaction.close();
  | 
  |         } catch (ResourceException ex)
  |         {
  |             throw new RemoteException("unable to send noop command");
  |         } finally
  |         {
  |             if (logger.isDebugEnabled())
  |             {
  |                 logger.debug("noop() - finally");
  |             }
  | 
  |             if (conn != null)
  |             {
  |                 try
  |                 {
  |                     conn.close();
  |                 } catch (ResourceException ex1)
  |                 {
  |                 }
  |             }
  |             input = null;
  |             rFactory = null;
  |             interactionSpec = null;
  |             conn = null;
  |         }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3859918#3859918

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3859918


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to