Seems to be perfectly thread-safe, VM guarantees that the static initializer is 
executed in a thread-safe manne,
unless SOAPFactory.newInstance() has some global sideeffects. 
Do you see transient failures ?

Cheers, Sergey

----- Original Message ----- 
From: "Guy Pardon" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, September 13, 2007 9:40 AM
Subject: SOAPFactory thread safe?


> Hi,
> 
> Is the following code thread safe? In other words, can we reuse the  
> same soapFactory for different threads (concurrently) and within  
> different MEPs?
> 
> Thanks,
> Guy
> 
> 
> private static SOAPFactory soapFactory = null;
> 
>     static {
>     try {
>     soapFactory = SOAPFactory.newInstance();
>     }
>     catch ( Exception e ) {
>     Configuration.logWarning ( "Failed to create SOAPFactory" , e );
>     }
>     }

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to