Hi,

I'm trying to use my own Avalon components by making use of the <cocoon
version="2.1" user-roles="/pve-decl-roles.xconf"> feature and adding my own
role file which defines a single component of my own:

<?xml version="1.0" encoding="UTF-8"?>
<role-list>
        <role name="com.ezgov.saf.techlayer.ConfigurationManager"
                  shorthand="appl-conf-manager"
                  default-class="com.ezgov.saf.techlayer.ConfigurationManager"/>
</role-list>

For testing this, I try to look up this component in a Transformer in the
"setup()" method where there is also this component look up:

try {
                Component       comp    =       _manager.lookup(XMLSerializer.ROLE);
            _serializer = (XMLSerializer)comp;
}   catch   (ComponentException e)  {
            String errorMsg = "Couldn't instantiate XMLSerializer";
            getLogger().error(errorMsg, e);
            throw new ProcessingException(errorMsg, e);
}

Now, the result of _manager.lookup(ConfigurationManager.ROLE) gives me an
object of the class "$Proxy2" which can obviously not be cast to
"ConfigurationManager"... The _serializer on the other hand yields the
correct object class "XMLSerializer".

I did not find explanation of how to do this in Cocoon 2.1.1. Does anyone
know where this is explained or what I'm probably doing wrong? Or is there
an explanation of Cocoon 2.1.1 component management somewhere?

Thanks in advance for any help!

Regards,
Francis

Ing. Francis RA Vermeulen
EzGov
Senior Architect

"De Schinkel" Rijnsburgstraat 11
1059 AT Amsterdam

Tel. (Office): +31 (0)20 7133924
Fax: +31 (0)20 7133799

E-mail: [EMAIL PROTECTED]
Website: www.europe.ezgov.com

The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorised to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking any action in reliance on the contents of
this information is strictly prohibited and may be unlawful. EzGov B.V. is
neither liable for the proper and complete transmission of the information
contained in this communication nor for any delay in its receipt.


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

Reply via email to