On Sat, Feb 21, 2015 at 6:33 PM, Holger King <[email protected]> wrote:

>  So, when using a ThreadLocal you would declare it as "public static" to
> allow accessing the added connection object in the target code, here the
> "FSIdmAdaptor"?
>

That would work. More commonly you make it private and provide access via a
static method e.g.

  public static Connection getCurrentConnection()
  throws IllegalStateException {     // if no connection is set in the
current thread

For lots of examples look at Spring, e.g., TransactionAspectSupport
<http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-tx/4.1.3.RELEASE/org/springframework/transaction/interceptor/TransactionAspectSupport.java#TransactionAspectSupport>
.

-Archie

-- 
Archie L. Cobbs
_______________________________________________
aspectj-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to