Hello

Yesterday I tried to integrate a Spring application context into James,
that can be used within Mailets. It succeeded only halfway. My custom
component will be loaded during startup (I print out some loading
statements and spring logs some stuff), but I cannot access it with the
ServiceManager.

Assembly.xml looks like this:
##########################
  <block name="springcontext"
class="com.oneandone.ccsys.ccl.james.component.SpringContextLoader" />
##########################


The .xinfo of the SpringContextLoader component implements a simple
interface:
##########################
  <services>
    <service
name="com.oneandone.ccsys.ccl.james.component.SpringContext"/>
  </services>
##########################

The interface has a ROLE:
##########################
    String ROLE =
"com.oneandone.ccsys.ccl.james.component.SpringContext";
##########################

But I cannot access the component with the ServiceManager:
#########################
                        ServiceManager serviceManager = 
                                (ServiceManager)
getMailetContext().getAttribute(
        
Constants.AVALON_COMPONENT_MANAGER);
        SpringContext context =
        
(SpringContext)serviceManager.lookup(SpringContext.ROLE);
#########################


Error Message: 'Unable to provide implementation for SpringContext'.
When debugging, I cannot see my component in the map of the
ServiceManager, but I don't know how to register the component for this.
Do I have to implement a special interface like 'Contextualizable' or
something like that? This is an Avalon issue, but I don't understand how
to create components. There is not much documentation available for
Avalon, or let's say I cannot find it.


Thanks for any hint and greetings from Germany
Guido Franz




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

Reply via email to