[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-10-31 Thread Bill Burke
i meant also to say that this should work in JBoss AOP

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853441#3853441

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853441


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-10-31 Thread Bill Burke
well, you're gonna have to post the JBoss AOP example...

JBoss AOP Aspects can hold state.  An instance of the Aspect is created depending on 
the scope.  PER_VM, PER_CLASS, PER_INSTANCE< PER_ JOINPOINT.

Bill

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853440#3853440

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853440


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-09-15 Thread Bill Burke
If a particular joinpoint is "prepared" you do not have to recompile or even shutdown 
the JVM to add or remove an advice from a particular joinpoint.  You can also 
add/remove interceptors on a per instance basis at runtime with a prepared joinpoint.

How to prepare?



This will instrument the class.

Also, any other pointcut def will cause the class to be instrumented.  Instrumented 
classes without advices have VERY low overhead.  It is one extra method call and a 
boolean check.  You won't even notice it.


With JDK 5.0 you do not need a custom classloader.  I've written an agent to work with 
the java.lang.instrument package and it works pretty well.  I haven't integrated it 
with JBoss yet though as I have to change the run script and write some tests.

Kevin Conner also wrote something for JDK 1.4 that modifies java.lang.Class to insert 
the necessary hooks for JBoss AOP.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848319#3848319

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848319


---
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-09-14 Thread kabkhan
In JBoss AOP you can attach things dynamically via the AspectManager class. You need 
to prepare your class  first:

http://www.jboss.org/wiki/Wiki.jsp?page=JBossAOP Go to Tutorial/Dynamic AOP

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848186#3848186

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848186


---
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-18 Thread kabkhan
Sorry I'm not able to look at this in very much detail right now. 

Also, look at combining the .jar and .aop in an ear as shown in the tutorial. The 
tutorial is by now means a complete guide to all possible packaging options, just 
shows a few configurations I got working.

I have to admit I have not tried running it with 3.2.x yet, what happens if you try it 
with 4.0?

Also, for the AspectManagerService MBean config, you should set EnableTransformer to 
true.

Cheers,

Kab

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845480#3845480

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845480


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-16 Thread imsathya
Thanks a lot.

After going through the documentation, I revisited my deployment to match what had 
been speciifed but I still cant get it to work.

First, I created a .aop of my intercepter class (which I verified worked in the 
stand-alone mode) :


  | $ jar -tvf SimpleAOP.aop 
  |  0 Tue Aug 17 00:35:46 IST 2004 META-INF/
  | 70 Tue Aug 17 00:35:46 IST 2004 META-INF/MANIFEST.MF
  |  0 Tue Aug 17 00:34:10 IST 2004 classes/
  |  0 Tue Aug 17 00:34:10 IST 2004 classes/test/
  |  0 Tue Aug 17 00:34:10 IST 2004 classes/test/ejb/
  |   1409 Tue Aug 17 00:35:20 IST 2004 classes/test/ejb/SimpleInterceptor.class
  |177 Tue Aug 17 00:35:14 IST 2004 META-INF/jboss-aop.xml
  | 

I modified the $JBOSS_HOME/server/default/conf/jboss-service.xml file to add in the 
mbean specified in the link :


  |
  |
  |   false
  |   
  |   true
  |   
  |   true
  |   false
  |
  | 
  |
  |   
  |
  |http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845241#3845241

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845241


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-16 Thread kabkhan
Hi,

Before-After: There is more about this in another post somewhere in this thread, but 
basically interception in JBoss AOP is both before and after.

Example:


  | public class MyInterceptor implements Interceptor
  | {
  |public String getName() { return "MyInterceptor"; }
  | 
  |public Object invoke(Invocation invocation) throws Throwable
  |{
  |   Object o = null;
  |   //You can do "BEFORE" stuff here, e.g.
  |   long start = System.currentTimeMillis();
  | 
  |   //Invoke next method
  |   o = invocation.invokeNext();
  | 
  |   //You can do "AFTER" stuff here, e.g.
  |   long end = System.currentTimeMillis();
  |   long timeTaken = end - start;
  | 
  |   return o;
  |}
  | }
  | 

EJB: It all depends on the packaging. If you get jboss-head from cvs, it contains a 
new tutorial showing some options for packaging war and ear applications. Also, 
http://www.jboss.org/wiki/Wiki.jsp?page=RunningWithJBossApplicationServer contains 
some information on what you need to do to run with JBoss 3.2.5 if you haven't 
followed these steps already.

Cheers,

Kab



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845156#3845156

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845156


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-15 Thread imsathya
Sorry for replying to my own post.

Just another query. Would the interception for an EJB be different from that of a pure 
Java class ? 

Here is a test I tried.

- Created an entity bean with method findWithID(int) and deployed it in JBoss 3.2.5 
following the instructions specified.
- I defined a pointcut to intercept call to this method but I found that the advice 
was not being executed.

Then I defined a Java class with the same findWithID(int) and found the interception 
happening fine. 

Any extra settings required on the JBoss server ?

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845145#3845145

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845145


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-15 Thread imsathya
Thanks Bill,
That was very informative. 

Another query. AspectJ supports the notion of being able to define as to when you need 
an advice to be executed - before or after. So far as my understanding goes, JBoss AOP 
appears to be more interception based which appears to say "..when call X is made, 
execute AspectX first..". 

Is there support for the before-after like specification provided by AspectJ ? This is 
important to us when say we want to capture the time taken to execute method X. Using 
the before-after specifiers facilitates this greatly.

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845144#3845144

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845144


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-09 Thread neil loughran
Thanks Bill, 

What do you mean by dynamic?  I know that dynamic means different things in the AOP 
world.. for instance AspectJ folks might say that their CFLOW is dynamic as it 
collects information as the program is running yet is still to all intents and 
purposes a compile time technique.  

I believe Aspectwerkz allows new code to be plugged and unplugged at run time, hence 
its dynamicism.

So what does dynamic mean for JBoss?

Cheers
Neil



"Bill Burke" wrote : Why JBoss AOP over AspectJ?
  | - 100% pure Java
  | - annotation support (JDK 1.5 and 1.4)
  | - Metadata and annotation override facility
  | - load-time transformations (instead of compile time)
  | - hotdeployment of aspects (dynamic AOP)
  | - per-instance API (dynamic AOP)
  | - dynamic CFLOW
  | - pluggable pointcuts
  | - extended pointcut expressions (has and hasfield as well as typedefs).
  | 
  | I haven't looked at AspectWerkz since February, but they had limited support in 
their pointcut expression language at the time (no around for field interception, no 
constructor interception, no annotation support).  They did have better load-time 
transformation support, but we will catch up on this soon.
  | 
  | Bill
  | 
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844614#3844614

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844614


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-08-05 Thread Bill Burke
Why JBoss AOP over AspectJ?
- 100% pure Java
- annotation support (JDK 1.5 and 1.4)
- Metadata and annotation override facility
- load-time transformations (instead of compile time)
- hotdeployment of aspects (dynamic AOP)
- per-instance API (dynamic AOP)
- dynamic CFLOW
- pluggable pointcuts
- extended pointcut expressions (has and hasfield as well as typedefs).

I haven't looked at AspectWerkz since February, but they had limited support in their 
pointcut expression language at the time (no around for field interception, no 
constructor interception, no annotation support).  They did have better load-time 
transformation support, but we will catch up on this soon.

Bill



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844303#3844303

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844303


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-07-29 Thread neil loughran
I'm also interested in this.  What are the major reasons for choosing JBoss AOP over 
AspectJ or even Aspectwerkz?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843673#3843673

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843673


---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: JBoss AOP vs. AspectJ

2004-06-30 Thread kabkhan
Bill is at Java One, and should be able to give a proper answer when he is back. In 
the meantime:

Two people are working on Eclipse support at present, so expect something in that area 
soon.

You can use JBoss AOP with 3.2.4 or higher, docs/misc/running_jboss.html in the 
distribution shows how.

JBoss AOP comes with a set of aspects (with a LOT more to follow) where you can 
leverage JBoss services.

Cheers,

Kab

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840404#3840404

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840404


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development