[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How can I intercept every callto EntityManager.<somemethod>(arg)

Could you please present your aspect code so that we can try to understand what may be the problem?

Thanks,

Paulo Zenida



Meir Yanovich wrote:
hi and thanks for the fast replay 

I simple want to capture every instance in my code that that 
Looks like for example  : 
q = entityManager.createNamedQuery(Query);
q = entityManager.createNativeQuery(Query,Class);
q = entityManager.find(vo);

I need to change the argument values of the methods 

But im getting warning that says: 
no match for this type name: EntityManager
[Xlint:invalidAbsoluteTypeName]-advice defined in 
com.infrastructure.security.AspectSecurity has not 
	 been applied [Xlint:adviceDidNotMatch]

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Paulo Alexandre
Corigo Zenida
Sent: Thursday, November 29, 2007 5:25 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] How can I intercept every callto
EntityManager.<somemethod>(arg)

Hello,

I don't know if I understood what you meant but.. does the following
help you?

before() :
execution(* EntityManager.*(..)) {
// ...
}

Regards,

Paulo Zenida




Meir Yanovich wrote:
  
Hello all
Im trying hard to find pattern to intercept every instance in my code 
Inside methods that is looks like this: 

EntityManager.<some_kind_of_method>(arg(

I need to change the arg in this method and insert new one based on
    
some
  
checks 

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

*** eSafe scanned this email for malicious content ***
*** IMPORTANT: Do not open attachments from unrecognized senders  ***
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-user
  

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature