Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: FW: [aspectj-users] AspectJ with weblogic application server6.1!!!




Sharath,

The "-javaagent" is a Java 5 feature along with the java.lang.intrument API
that is used by AspectJ. You should use the JRockit agent instead under BEA
which I believe is available at the 1.4 level. See
http://www.eclipse.org/aspectj/doc/next/adk15notebook/ltw-agents.html.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

"Sharath Reddy" <Sharath.Reddy@xxxxxxxxxxxxxx>@eclipse.org on 08/09/2005
18:21:27

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-bounces@xxxxxxxxxxx


To:    <aspectj-users@xxxxxxxxxxx>
cc:    discuss@xxxxxxxx
Subject:    FW: [aspectj-users] AspectJ with weblogic application
       server6.1!!!





Dear All,



   Installed 'aspectj-1.5.0_M3a.jar' and executed sample program in command
line and it is working fine with 'pointcut'.



   I'm running BEA weblogic6.1 application server with JDK(j2sdk1.4.2_07)
version. Following changes are carried before starting application server.



1. Added 'C:\aspectj1.5\lib' to CLASSPATH.

2. Added 'C:\aspectj1.5\bin' to PATH.

3. Added '-Daj.weaving.verbose=true' and
'-Djavaagent=C:\aspectj1.5\lib\aspectjweaver.jar' options while starting
app server.

      When I added ‘-javaagent:aspectjweaver.jar’ to the starting app
server command it is throwing following error:

Unrecognized option: -javaagent:aspectjweaver.jar

Could not create the Java virtual machine.



4. Compiled programs with below command:



   ajc -d
C:\bea\wlserver6.1\config\isri\applications\isriapp\web\WEB-INF\classes
-classpath "C:\ISRI Restructured\isriapp\web\WEB-INF\classes;C:\ISRI
Restructured\lib\*.jar;C:\ISRI
Restructured\lib\vendorclasses.jar;%CLASSPATH%" TestManager.java
TestAspect.java



   -----



   Application server is started fine but it is not showing ‘pointcut’
information after executing ‘TestManager.getIP()’ method. Please find the
source programs in attachment. Please let me know, how to create aop.xml
file for these programs? Whether ‘jdk1.4’ is supported by aspectj? How to
enable pointcut for this scenario?



Thanks in advance.



Sharath.





-----Original Message-----
From: Alexandre Vasseur [mailto:avasseur@xxxxxxxxx]
Sent: Tuesday, July 19, 2005 10:26 AM
To: Sharath Reddy
Cc: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] AspectJ with weblogic application
server6.1/8.1!!!



This is not available in M2

It is not available neither in the last development build from

http://www.eclipse.org/aspectj/downloads.php (june 20)

so you 'd better wait (else checkout the cvs and build the whole yourself).



Anyway since I assume there will be a build updated soon here are the

steps that you would need - for further reference:



- change your weblogic startup script so that it starts with

aspectjweaver.jar in its classpath and with the following option

(assuming you are using JRockit):

java ......  -Xmanagement:class=org.aspectj.weaver.loadtime.JRockitAgent



- write and compile your aspect, place it in the classpath



- write an aop.xml file and have it in a somepath/META-INF/ folder,

with somepath a folder that is part of your classpath (I assume you

want to enable the weaving for the whole app server, else you would

have to pack this file in your deployed application)



The following options might be handy

-Daj.weaving.verbose=true  (JVM option, in the startup script)

and

<weaver options="-verbose"> in the aop.xml file



Read more about the aop.xml file for such a scenario here

http://eclipse.org/aspectj/doc/next/adk15notebook/ltw.html



Once again, all this will be available in M3, so I would advise you to

wait or look for more support around the dev2dev extension you found

on BEA newsgroups.



Alex



On 7/19/05, Sharath Reddy <Sharath.Reddy@xxxxxxxxxxxxxx> wrote:

> Hi Alex,

>

>    I'm using 'AspectJ 1.5.0M2' and BEA JRockit. Can you please let me

> know the instructions how to enable AspectJ in Weblogic application

> server.

>

> Thanks,

> Sharath.

>

> -----Original Message-----

> From: aspectj-users-bounces@xxxxxxxxxxx

> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Alexandre

> Vasseur

> Sent: Tuesday, July 19, 2005 9:53 AM

> To: aspectj-users@xxxxxxxxxxx

> Subject: Re: [aspectj-users] AspectJ with weblogic application

> server6.1/8.1!!!

>

> Hi

>

> This extension from dev2dev is a work from the WebLogic team. You

> should be able to find a link on dev2dev to some newsgroup to find

> help about it. This extension is not supported by the AspectJ team.

>

> We provide on the opposite a generic way to enable AspectJ in WebLogic

> (or any kind of app server) providing that you run with Java 5, or

> with BEA JRockit. This is not yet available in AspectJ 1.5 milestones

> (M2) though. Support for this feature under Java 1.3/1.4 is also a

> work in progress.

>

> Alex

>

> On 7/19/05, Sharath Reddy <Sharath.Reddy@xxxxxxxxxxxxxx> wrote:

> >

> >

> >

> > Dear All,

> >

> >  >From below URL it is clear that weblogic6.1 supports AOP.

> >

> > http://www.theserverside.com/news/thread.tss?thread_id=20514#90101

> >

> >        I executed sample programs standalone and it is working fine.

> Here

> > I'm attaching aspect program (ISRAspect.java) and it is listing on

> getIP

> > method in IPManager.java program. I compiled the both programs with

> 'ajc'

> > and updated PATH and CLASSPATH with AspectJ for starting the

> > weblogic(startweblogic.cmd). The server is starting OK but it is not

> showing

> > the message (In callSayMessage!!!!!!) which is to be fired after

> getIP()

> > method is invoked.

> >

> >      Keeping aspects.jar file in CLASSPATH and adding below lines in

> server

> > startup( as per

> > http://dev2dev.bea.com/utilitiestools/monitoring.html)

> >

> >

> -Dweblogic.classloader.preprocessor=weblogic.aspects.AspectClassPreProce

> ssor

> >  -Dweblogic.aspects.debug=true

> >

> >  When I ran the server in weblogic6.1(windows) it is displaying

> >

> >  Pre-processor weblogic.aspects.AspectClassPreProcessor

> > loaded and initialized

> >

> >  but it is failing to deploy 'DefaultWebApp' because of that I

> couldn't able

> > to validate AOP messages(windows.log file in attachment).

> >

> >  When I carried the same steps in weblogic8.1 in LINUX it is showing

> > following message (linux.out file in attachment)

> >

> >  <ClassLoader><W>Pre-processor class

> > 'weblogic.aspects.AspectClassPreProcessor' not found

> >

> >  But the server is running fine and it is not showing AOP messages.

> >

> >  Please let me know how to use AspectJ in weblogic6.1/8.1. How to use

> > AspectJ with EJB stateless session bean methods?

> >

> >  Thanks in advance.

> >

> >

> >

> > Regards,

> >

> > Sharath Kumar Reddy Karnati

> >

> >

> > _______________________________________________

> > aspectj-users mailing list

> > aspectj-users@xxxxxxxxxxx

> > https://dev.eclipse.org/mailman/listinfo/aspectj-users

> >

> >

> >

> >

> _______________________________________________

> aspectj-users mailing list

> aspectj-users@xxxxxxxxxxx

> https://dev.eclipse.org/mailman/listinfo/aspectj-users

>

>

>




_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Back to the top