由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - how to weave an existing jar ?
相关主题
another aspectJ questionTop Ten Errors Java Programmers Make(2)
spring AOP questionRe: How to lock a file and detect a thread is over?
How to detect the operation system language in Java?why is this necessary?
如何把函数体放入到 try ... catch ... 中关于char和int的问题
Question about Model 2Timeout issue
看了一下Spring Roowireless connection
AOP 中的 self-invocation 问题我的浏览器无法load用java写的网站是怎么回事?
Re: 恳请各位JAVA大师:有没有这样一个东西?求助:Dell E520N操作系统安装问题 (转载)
相关话题的讨论汇总
话题: blah话题: jar话题: weave话题: detect话题: existing
进入Java版参与讨论
1 (共1页)
c******n
发帖数: 4965
1
I have a jar that contains a Blah class
and in Blah() ctor it somehow calls System.gc()
now let's say I use the jar that contains Blah(), and call new Blah().
I would get the gc(), so I am trying to detect this call ----- I'm not sure
where it called the "new Blah()" and System.gc() . I'm trying to do
through aspectj, by doing a pointcut on System.gc
but the problem is, now if I include the Blah() implementation in my code,
it's able to detect it, but if I just include the Blah() jar, it can't weave
and detect it.
I tried adding the -javaagent:aspectjweaver.jar , but it doesn't work
Thanks
T*********g
发帖数: 496
2
any detail for ur pointcut, advice, and eng?

sure
weave

【在 c******n 的大作中提到】
: I have a jar that contains a Blah class
: and in Blah() ctor it somehow calls System.gc()
: now let's say I use the jar that contains Blah(), and call new Blah().
: I would get the gc(), so I am trying to detect this call ----- I'm not sure
: where it called the "new Blah()" and System.gc() . I'm trying to do
: through aspectj, by doing a pointcut on System.gc
: but the problem is, now if I include the Blah() implementation in my code,
: it's able to detect it, but if I just include the Blah() jar, it can't weave
: and detect it.
: I tried adding the -javaagent:aspectjweaver.jar , but it doesn't work

1 (共1页)
进入Java版参与讨论
相关主题
求助:Dell E520N操作系统安装问题 (转载)Question about Model 2
问问window xp格式化C盘的问题看了一下Spring Roo
求助:Dell E520N操作系统安装问题 (转载)AOP 中的 self-invocation 问题
“There are good story lines here”Re: 恳请各位JAVA大师:有没有这样一个东西?
another aspectJ questionTop Ten Errors Java Programmers Make(2)
spring AOP questionRe: How to lock a file and detect a thread is over?
How to detect the operation system language in Java?why is this necessary?
如何把函数体放入到 try ... catch ... 中关于char和int的问题
相关话题的讨论汇总
话题: blah话题: jar话题: weave话题: detect话题: existing