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"?

@Aspect
public class FSConnectionAspect {
public static ThreadLocal<Connection> threadLocal = new ThreadLocal<>();

    
threadLocal.set(ConnectionManager.getConnection(<host>,<port>,<mode>,<user>,<password>))
}

If you do not agree it would be kind to offer a little pseudo code to get a better understanding how to offer the created connection in the advice to the pointcut matching implementation.

Besides, it's yet unclear for me how the solution offered by "Anggiat Barita" using "percflow" could solve that problem more easier..

A little explanation might help here, too :-)


Am .02.2015, 20:10 Uhr, schrieb Archie Cobbs <arc...@dellroad.org>:

Why not just use a ThreadLocal?

-Archie
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
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