Re: Casting a $proxy2 instance

Niclas Hedhman <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Organization Private
Message-ID <[email protected]>
On Monday 16 August 2004 18:03, Steinkamp Andre wrote:

> i can only cast this proxy class
> instance into an instance of the interface, but i need an instance of the
> implementation class ResourceManagerImpl. how can i get this object the
> dynamic proxy class was instatiated??

You should go to the drawing board and review your design. 
You are describing a hack which will break the day when someone after you 
re-implement the other service, and the whole purpose of IoC and SoC is to 
remove this hacks, and 'force' developers to write re-usable code, not 
hacking together bad code.

That said;
I also notice that your code doesn't seem to be Merlin based. Merlin allows 
for disabling proxies, but I am not sure about other containers.
Depending on your circumstances, I suggest;
1. Review your design to avoid breaking the safety net for re-usable 
components.
2. Bring the question up at [email protected], since most ECM experts 
hangs out there nowadays, and not much on this users-list.

3. Evaluate the cost/benefit ratio of moving to Merlin. If you need help with 
that, I suggest you stop by IRC channel #merlin on irc.freenode.net


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.