1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.transport.soap.axis; |
8 | |
|
9 | |
import org.mule.api.lifecycle.InitialisationCallback; |
10 | |
import org.mule.api.lifecycle.InitialisationException; |
11 | |
|
12 | |
import org.apache.axis.handlers.soap.SOAPService; |
13 | |
import org.apache.commons.logging.Log; |
14 | |
import org.apache.commons.logging.LogFactory; |
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
public class AxisInitialisationCallback implements InitialisationCallback |
21 | |
{ |
22 | 0 | protected static final Log logger = LogFactory.getLog(AxisInitialisationCallback.class); |
23 | |
|
24 | |
private SOAPService service; |
25 | 0 | private boolean invoked = false; |
26 | |
|
27 | |
public AxisInitialisationCallback(SOAPService service) |
28 | 0 | { |
29 | 0 | this.service = service; |
30 | 0 | } |
31 | |
|
32 | |
public void initialise(Object component) throws InitialisationException |
33 | |
{ |
34 | |
|
35 | 0 | if (invoked) |
36 | |
{ |
37 | 0 | return; |
38 | |
} |
39 | 0 | if (component instanceof AxisInitialisable) |
40 | |
{ |
41 | 0 | if (logger.isDebugEnabled()) |
42 | |
{ |
43 | 0 | logger.debug("Calling axis initialisation for component: " + component.getClass().getName()); |
44 | |
} |
45 | 0 | ((AxisInitialisable)component).initialise(service); |
46 | |
} |
47 | 0 | invoked = true; |
48 | 0 | } |
49 | |
} |