1
2
3
4
5
6
7
8
9
10 package it.imolinfo.jbi4cics.jbi;
11
12 import it.imolinfo.jbi4cics.webservices.runtime.ServiceCreator;
13 import org.apache.servicemix.common.BaseComponent;
14 import org.apache.servicemix.common.BaseLifeCycle;
15 import org.codehaus.xfire.XFire;
16
17
18
19
20 public final class Jbi4cicsLifeCycle extends BaseLifeCycle {
21
22 private Jbi4cicsComponentConfiguration configuration
23 = new Jbi4cicsComponentConfiguration();
24
25
26
27
28 private XFire xfire;
29
30
31
32
33 private BCELClassLoader bcelClassLoader
34 = new BCELClassLoader(getClass().getClassLoader());
35
36
37
38
39
40
41
42 public Jbi4cicsLifeCycle(BaseComponent component) {
43 super(component);
44 }
45
46
47
48
49
50
51 public XFire getXFire() {
52 return xfire;
53 }
54
55 @Override
56 protected void doInit() throws Exception {
57 super.doInit();
58 configuration.setRootDir(context.getWorkspaceRoot());
59 configuration.load();
60 xfire = ServiceCreator.createXFire(context);
61 }
62
63
64
65
66
67
68 public BCELClassLoader getBCELClassLoader() {
69 return bcelClassLoader;
70 }
71
72
73
74
75
76
77 public void setBCELClassLoader(BCELClassLoader bcelClassLoader) {
78 this.bcelClassLoader = bcelClassLoader;
79 }
80 }