"clebertsuconic" wrote :
| Are you sure you are calling invocation.invokeNext() in your interceptor?
|
| This is just a guessing, but at a first look looks like you are calling the
| banking.aspects.persistance.PreparedStatements.getConnection
| instead invocation.invokeNext().
|
| Clebert
Hi,
Of course it's impossible to run ...PreparedStatements.getConnection() within anywhere
except the class, cause it's private - except one would invoke it by using reflection,
which I don't.
But here is the aspect class, that I haven't provided before:
| public class DbConnectionAspect
| {
| private DbConnectionsHelper dbConnectionsHelper;
|
| public DbConnectionAspect()
| {
| dbConnectionsHelper = new DbConnectionsHelper();
| }
|
| public Object switchConnection(Invocation invocation)
| throws Throwable
| {
| invocation.invokeNext();
| return dbConnectionsHelper.getConnectionForCurrentThread();
| }
| }
|
As u see, I totally ignore returned value of invocation.invokeNext() which is my aim:
to switch global connection into per-thread connection (wchich allows one to program
threaded apps in non-threaded way :] )
I'll check these tests from CVS...
--nthx
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844563#3844563
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844563
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development