My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
package org.zeroturnaround.javarebel.integration;


import org.zeroturnaround.javarebel.ClassResourceSource;
import org.zeroturnaround.javarebel.IntegrationFactory;
import org.zeroturnaround.javarebel.Plugin;
import org.zeroturnaround.javarebel.ReloaderFactory;
import org.zeroturnaround.javarebel.integration.classworlds.ClassRealmCBP;
import org.zeroturnaround.javarebel.integration.confluence.JarClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.eclipse301.Eclipse301DefaultClassLoaderClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.elcommons.BeanInfoManagerElCommonsCBP;
import org.zeroturnaround.javarebel.integration.elcommons.BeanInfoManagerStandardLangCBP;
import org.zeroturnaround.javarebel.integration.equinox.EquinoxClassPathManagerClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.equinox.EquinoxDefaultClassLoaderClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.generic.FindClassClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.google.GaeProxyPolicyCBP;
import org.zeroturnaround.javarebel.integration.intellij.IntelliJClassLoaderClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.javaxel.BeanELResolverCBP;
import org.zeroturnaround.javarebel.integration.javaxel.BeanELResolverElCommonsCBP;
import org.zeroturnaround.javarebel.integration.jboss4.RepositoryClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.jboss4.UnifiedLoaderRepository3CBP;
import org.zeroturnaround.javarebel.integration.jboss5.BaseClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.jboss5.BaseClassLoaderDomainCBP;
import org.zeroturnaround.javarebel.integration.netbeans.NetbeansJarClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.netbeans.ProxyClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.oc4j.EJBPackageDeploymentCBP;
import org.zeroturnaround.javarebel.integration.oc4j.PolicyClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.resin.LineConfigExceptionCBP;
import org.zeroturnaround.javarebel.integration.resin.ResinDeployControllerConfigCBP;
import org.zeroturnaround.javarebel.integration.resin.ResinDynamicClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.resin.WatchdogProcessCBP;
import org.zeroturnaround.javarebel.integration.tomcat.WebappClassLoaderClassBytecodeProcessor;
import org.zeroturnaround.javarebel.integration.weblogic.ChangeAwareClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.weblogic.EJBJarCBP;
import org.zeroturnaround.javarebel.integration.weblogic.EarCBP;
import org.zeroturnaround.javarebel.integration.weblogic.GenericClassLoaderCBP;
import org.zeroturnaround.javarebel.integration.websphere.CompoundClassLoaderClassBytecodeProcessor;

/**
* @author ekabanov
* @see http://www.csg.is.titech.ac.jp/~chiba/javassist/tutorial/tutorial2.html
*/
public class IntegrationPlugin implements Plugin {
public void preinit() {
ReloaderFactory
.getInstance()
.addClassReloadListener(new IntegrationClassEventListener());

String[] standardIntegrationClassLoaders = new String[]{
// TOMCAT
"org.apache.catalina.loader.StandardClassLoader",
// JETTY
"org.mortbay.jetty.webapp.WebAppClassLoader",
// GLASSFISH
"com.sun.enterprise.loader.EJBClassLoader",
// GWT
"com.google.gwt.dev.shell.CompilingClassLoader",
// Oracle 9.0.4
"com.evermind.naming.ContextClassLoader",
// IBM WAS 6.1
"com.ibm.ws.bootstrap.ExtClassLoader",
// JONAS-4.10.3
"org.objectweb.jonas_lib.loader.EjbJarClassLoader"
};

IntegrationFactory.getInstance().addIntegrationProcessor(
standardIntegrationClassLoaders,
new FindClassClassBytecodeProcessor());

// TOMCAT 5.5

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.apache.catalina.loader.WebappClassLoader",
new WebappClassLoaderClassBytecodeProcessor());

// IBM WAS 6.1

IntegrationFactory.getInstance().addIntegrationProcessor(
"com.ibm.ws.classloader.CompoundClassLoader",
new CompoundClassLoaderClassBytecodeProcessor());

// Equinox (and Eclipse)

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader",
new EquinoxDefaultClassLoaderClassBytecodeProcessor());

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.eclipse.osgi.baseadaptor.loader.ClasspathManager",
new EquinoxClassPathManagerClassBytecodeProcessor());

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.eclipse.osgi.framework.internal.defaultadaptor.DefaultClassLoader",
new Eclipse301DefaultClassLoaderClassBytecodeProcessor());

// JBOSS 4
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.jboss.mx.loading.RepositoryClassLoader",
new RepositoryClassLoaderCBP());

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.jboss.mx.loading.UnifiedLoaderRepository3",
new UnifiedLoaderRepository3CBP());

// JBOSS 5
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.jboss.classloader.spi.base.BaseClassLoader",
new BaseClassLoaderCBP());

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.jboss.classloader.spi.base.BaseClassLoaderDomain",
new BaseClassLoaderDomainCBP());

/*
* Oracle 10.1.3+
*
* PolicyClassLoader is used: 10.1.3.3.0, 10.1.3.4.0
* PolicyClassLoader is not used: 9.0.4, 10.1.2.0.2
*/
IntegrationFactory.getInstance().addIntegrationProcessor(
"oracle.classloader.PolicyClassLoader",
new PolicyClassLoaderCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"com.evermind.server.ejb.EJBPackageDeployment",
new EJBPackageDeploymentCBP());

// Weblogic

IntegrationFactory.getInstance().addIntegrationProcessor(
"weblogic.utils.classloaders.GenericClassLoader",
new GenericClassLoaderCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"weblogic.utils.classloaders.ChangeAwareClassLoader",
new ChangeAwareClassLoaderCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"weblogic.application.io.Ear",
new EarCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"weblogic.ejb.spi.EJBJar",
new EJBJarCBP());

// Caucho Resin (Tested on 3.0.27, 3.1.3 and 3.2.1)

IntegrationFactory.getInstance().addIntegrationProcessor(
"com.caucho.loader.DynamicClassLoader",
new ResinDynamicClassLoaderCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
new String[] {
"com.caucho.boot.ResinWatchdog", // Resin 3.1.x
"com.caucho.boot.WatchdogProcess" // Resin 3.2.x
},
new WatchdogProcessCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"com.caucho.server.deploy.DeployController",
new ResinDeployControllerConfigCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"com.caucho.config.LineConfigException",
new LineConfigExceptionCBP());

// Google App Engine 1.x

IntegrationFactory.getInstance().addIntegrationProcessor(
"com.google.appengine.tools.development.IsolatedAppClassLoader$ProxyPolicy",
new GaeProxyPolicyCBP());

// IntelliJ IDEA

IntegrationFactory.getInstance().addIntegrationProcessor(
"com.intellij.util.lang.UrlClassLoader",
new IntelliJClassLoaderClassBytecodeProcessor());

// Atlassian Confluence
IntegrationFactory.getInstance()
.addIntegrationProcessor(
"com.atlassian.plugin.loaders.classloading.JarClassLoader",
new JarClassLoaderCBP());

// Classworlds
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.codehaus.plexus.classworlds.realm.ClassRealm",
new ClassRealmCBP());

// Netbeans
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.netbeans.JarClassLoader",
new NetbeansJarClassLoaderCBP());
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.netbeans.ProxyClassLoader",
new ProxyClassLoaderCBP());

// commons-el
IntegrationFactory.getInstance().addIntegrationProcessor(
"org.apache.taglibs.standard.lang.jstl.BeanInfoManager",
new BeanInfoManagerStandardLangCBP());

IntegrationFactory.getInstance().addIntegrationProcessor(
"org.apache.commons.el.BeanInfoManager",
new BeanInfoManagerElCommonsCBP());

// javax.el
IntegrationFactory.getInstance().addIntegrationProcessor(
"javax.el.BeanELResolver",
new BeanELResolverCBP());

IntegrationFactory.getInstance().addIntegrationProcessor(
"javax.el.BeanELResolver$BeanProperties",
new BeanELResolverElCommonsCBP());
}

public boolean checkDependencies(ClassLoader cl, ClassResourceSource crs) {
return false;
}

public String getDescription() {
return null;
}

public String getId() {
return null;
}

public String getName() {
return null;
}

public String getAuthor() {
return null;
}

public String getWebsite() {
return null;
}
}
Show details Hide details

Change log

r1302 by reinra on Today (10 hours ago)   Diff
[No log message]
Go to: 
Project members, sign in to write a code review

Older revisions

r1298 by reinra on Jun 30 (6 days ago)   Diff
[No log message]
r1207 by reinra on May 21, 2009   Diff
[No log message]
r1206 by reinra on May 21, 2009   Diff
[No log message]
All revisions of this file

File info

Size: 9744 bytes, 233 lines
Hosted by Google Code