Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
2c199cf1
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2c199cf1
编写于
7月 21, 2011
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated javadoc for server-specific LoadTimeWeavers
上级
f800a026
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
44 addition
and
36 deletion
+44
-36
org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
...amework/context/weaving/DefaultContextLoadTimeWeaver.java
+9
-7
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossClassLoaderAdapter.java
...nstrument/classloading/jboss/JBossClassLoaderAdapter.java
+3
-2
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java
...rk/instrument/classloading/jboss/JBossLoadTimeWeaver.java
+16
-13
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java
...amework/instrument/classloading/jboss/JBossMCAdapter.java
+5
-4
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java
...strument/classloading/jboss/JBossMCTranslatorAdapter.java
+5
-4
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java
...rk/instrument/classloading/jboss/JBossModulesAdapter.java
+4
-3
org.springframework.context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java
...ument/classloading/websphere/WebSphereLoadTimeWeaver.java
+2
-3
未找到文件。
org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
浏览文件 @
2c199cf1
/*
* Copyright 2002-201
0
the original author or authors.
* Copyright 2002-201
1
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -20,6 +20,7 @@ import java.lang.instrument.ClassFileTransformer;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.BeanClassLoaderAware
;
import
org.springframework.beans.factory.DisposableBean
;
import
org.springframework.instrument.InstrumentationSavingAgent
;
...
...
@@ -40,13 +41,14 @@ import org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWe
* "<code>loadTimeWeaver</code>"; the most convenient way to achieve this is
* Spring's <code><context:load-time-weaver></code> XML tag.
*
* <p>This class implements a runtime environment check for obtaining
the
*
appropriate weaver implementation: As of Spring 2.5, it detects Sun'
s
*
GlassFish, Oracle's OC4J, BEA's WebLogic 10
,
*
{@link InstrumentationSavingAgent Spring's VM agent} and any
* {@link ClassLoader} supported by Spring's {@link ReflectiveLoadTimeWeaver}
* <p>This class implements a runtime environment check for obtaining
*
the appropriate weaver implementation: As of Spring 3.1, it detect
s
*
Oracle WebLogic 10, Oracle OC4J 10, GlassFish 3, JBoss AS 5, 6 and 7
,
*
IBM WebSphere 7 and 8, {@link InstrumentationSavingAgent Spring's VM agent}
*
and any
{@link ClassLoader} supported by Spring's {@link ReflectiveLoadTimeWeaver}
* (for example the
* {@link org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader}).
* {@link org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader}
* for Tomcat 5, 6 and 7).
*
* @author Juergen Hoeller
* @author Ramnivas Laddad
...
...
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossClassLoaderAdapter.java
浏览文件 @
2c199cf1
/*
* Copyright 2011 the original author or authors.
* Copyright 20
02-20
11 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -20,8 +20,9 @@ import java.lang.instrument.ClassFileTransformer;
/**
* Simple interface used for handling the different JBoss class loader adapters.
*
*
* @author Costin Leau
* @since 3.1
*/
interface
JBossClassLoaderAdapter
{
...
...
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java
浏览文件 @
2c199cf1
/*
* Copyright 2002-20
09
the original author or authors.
* Copyright 2002-20
11
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -25,18 +25,16 @@ import org.springframework.util.ClassUtils;
/**
* {@link LoadTimeWeaver} implementation for JBoss's instrumentable ClassLoader.
* Currently supports JBoss 5, 6 and 7 (since Spring 3.1).
* Autodetects the specific JBoss version at runtime: currently supports
* JBoss AS 5, 6 and 7 (as of Spring 3.1).
*
* <p><b>NOTE:</b> Requires JBoss AS version 5.0.0 or higher.
* <p><b>NOTE:</b> On JBoss 6.0.0, to avoid the container loading the classes before
* <p><b>NOTE:</b> On JBoss 6.0, to avoid the container loading the classes before
* the application actually starts, one needs to add <tt>WEB-INF/jboss-scanning.xml</tt>
* to her archive with the following content:
* <pre>
* <scanning xmlns="urn:jboss:scanning:1.0"/>
* </pre>
*
* <pre><scanning xmlns="urn:jboss:scanning:1.0"/></pre>
*
* <p>Thanks to Ales Justin and Marius Bogoevici for the initial prototype.</p>
*
*
* @author Costin Leau
* @since 3.0
*/
...
...
@@ -44,6 +42,7 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
private
final
JBossClassLoaderAdapter
adapter
;
/**
* Create a new instance of the {@link JBossLoadTimeWeaver} class using
* the default {@link ClassLoader class loader}.
...
...
@@ -66,14 +65,17 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
if
(
loaderClassName
.
startsWith
(
"org.jboss.classloader"
))
{
// JBoss AS 5 or JBoss AS 6
this
.
adapter
=
new
JBossMCAdapter
(
classLoader
);
}
else
if
(
loaderClassName
.
startsWith
(
"org.jboss.modules"
))
{
}
else
if
(
loaderClassName
.
startsWith
(
"org.jboss.modules"
))
{
// JBoss AS 7
this
.
adapter
=
new
JBossModulesAdapter
(
classLoader
);
}
else
{
throw
new
IllegalArgumentException
(
"Unexpected classloader type: "
+
loaderClassName
);
}
else
{
throw
new
IllegalArgumentException
(
"Unexpected ClassLoader type: "
+
loaderClassName
);
}
}
public
void
addTransformer
(
ClassFileTransformer
transformer
)
{
this
.
adapter
.
addTransformer
(
transformer
);
}
...
...
@@ -85,4 +87,5 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
public
ClassLoader
getThrowawayClassLoader
()
{
return
new
SimpleThrowawayClassLoader
(
getInstrumentableClassLoader
());
}
}
\ No newline at end of file
}
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java
浏览文件 @
2c199cf1
/*
* Copyright 200
6-2009
the original author or authors.
*
* Copyright 200
2-2011
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
...
@@ -28,6 +28,7 @@ import org.springframework.util.ReflectionUtils;
* through reflection) for load time weaving.
*
* @author Costin Leau
* @since 3.1
*/
class
JBossMCAdapter
implements
JBossClassLoaderAdapter
{
...
...
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java
浏览文件 @
2c199cf1
/*
* Copyright 200
6-2009
the original author or authors.
*
* Copyright 200
2-2011
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
...
@@ -28,6 +28,7 @@ import java.security.ProtectionDomain;
* being used.
*
* @author Costin Leau
* @since 3.1
*/
class
JBossMCTranslatorAdapter
implements
InvocationHandler
{
...
...
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossModulesAdapter.java
浏览文件 @
2c199cf1
/*
* Copyright 2011 the original author or authors.
* Copyright 20
02-20
11 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -24,9 +24,10 @@ import org.springframework.util.Assert;
import
org.springframework.util.ReflectionUtils
;
/**
* JBoss 7
A
dapter.
*
* JBoss 7
a
dapter.
*
* @author Costin Leau
* @since 3.1
*/
class
JBossModulesAdapter
implements
JBossClassLoaderAdapter
{
...
...
org.springframework.context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java
浏览文件 @
2c199cf1
...
...
@@ -23,9 +23,8 @@ import org.springframework.util.Assert;
import
org.springframework.util.ClassUtils
;
/**
* {@link LoadTimeWeaver} implementation for WebSphere instrumentable classloader.
*
* <p><b>NOTE:</b> Requires WebSphere Application Server version 7.0.0 or higher.
* {@link LoadTimeWeaver} implementation for WebSphere's instrumentable ClassLoader.
* Compatible with WebSphere 7 as well as 8.
*
* @author Costin Leau
* @since 3.1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录