Thanks. I think we will follow the first way.

-----Urspr�ngliche Nachricht-----
Von: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. September 2004 17:17
An: [email protected]
Betreff: Re: AW: intercepting 'initialize-method'


I would suggest that you are doing two different things here: initializing
your service (which is meant to be trivial and error
free) and preloading your database data.  Obviously, the second of these is
the one that needs transaction support.

You have a few options, such as seperating the cache logic from the database
access logic.  The cache service can then invoke methods on the database
access service, which can be properly intercepted.

You could also lazily initialize your cache on each service method
invocations, but that's pretty ugly (it's the opposite of what HiveMind
should do).


----- Original Message -----
From: Teshler, Andre <[EMAIL PROTECTED]>
Date: Thu, 2 Sep 2004 17:10:21 +0200 
Subject: AW: intercepting 'initialize-method'
To: "[email protected]" <[email protected]>

 
I am initializing object-cache from the database in the initialize-method...

My interceptor is the "transaction-interceptor" which starts transaction 
and manages the db-connection... 
  
-----Urspr�ngliche Nachricht-----
Von: James Carman [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. September 2004 17:04
An: [email protected]
Betreff: RE: intercepting 'initialize-method'

 
 
 

Yes, you can intercept it, but the interceptor won't be called when the
instance is constructed.  Any subsequent calls to the service's initialize
method (through its proxy) will use the interceptor.  The BuilderFactory
calls the initialize method on the service implementation object directly.
Of course that's probably NOT what you want to do (call the initialize
method directly).  What are you trying to do?  Why do you need to intercept
your initialize method? 
Maybe we can come up with another way to do it.

  

-----Original Message-----
From: Teshler, Andre [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 02, 2004 10:52 AM
To: '[email protected]'
Subject: intercepting 'initialize-method' 

  
 

Hello, 

I am wondering whether it is possible to intercept the the method used as
'initialize-method' for the service.

In my tests the hivemind seems to call the 'initialize-method' of the _inner
class directly ignoring all interceptors defined for the

Service although the method is declared in the service interface. 

Thanks 

Andre Teshler 



-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to