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