Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AspectJ in WAR files

All,

This is a code (aspect) problem and not Jboss as I have aspectj running
under Jboss.

Thanks,

Ron DiFrango


-----Original Message-----
From: SOF - Buzzalino Diego [mailto:dbuzzalino@xxxxxxxxxxxxxxxxxx] 
Sent: Friday, August 22, 2003 1:15 PM
To: 'aspectj-users@xxxxxxxxxxx'
Subject: RE: [aspectj-users] AspectJ in WAR files



i'm not an AspecJ expert, but i would try this:

pointcut doPrint(): execution(* PersonAspect.*(..) throws ModelException,
ApplicationException );

if you find the solution, please, tell me
-----Mensaje original-----
De: qqasim@xxxxxxxxxxxxxx [mailto:qqasim@xxxxxxxxxxxxxx] Enviado el:
viernes, 22 de agosto de 2003 13:17
Para: aspectj-users@xxxxxxxxxxx
Asunto: [aspectj-users] AspectJ in WAR files


Hi I am try to do one thing for a log time but without any success.

I am trying to write some aspects, create a war file and deploy them on
Jboss. Everyting works apart from the aspects.

I have 1 java fils: com.person.Person
1 aspect file: com.person.PersonAspect

Person class includes following methods:

public Vector addSomething(String name, String[] books) 
            throws ModelException, ApplicationException 
{...}

I want to catch the above method, so I wrote following in PersonAspect: "
import  org.apache.log4j.Logger;

public aspect PersonAspect {
	
	static Logger logger;

pointcut doPrint(): execution(* PersonAspect.*(..) throws Exception);

before (): doPrint()
	{
		String classname =
thisJoinPoint.getSignature().getDeclaringType
().getName()+".class";
		
		logger = Logger.getLogger(classname);
		logger.error("LOGGER == aspect b4 " + thisJoinPoint );
		
		System.out.println("aspect b4 a ");
}
}

However, when I call addSomething(..) no statement is printed onto the
console.

I am wondering if there is something wrong woth my code or is it that JBoss 
would not print the logging statements.

regards

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
 
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.


Back to the top