Hello Thanks for the reply.
Yes, my initial approach was quite similar ;-) But we have about a dozen mailets and high traffic. So these would be a performance leak. Yesterday I managed it to access my component from mailets. Please see my other reply. Thanks Guido Franz -----Ursprüngliche Nachricht----- Von: Mark Derricutt [mailto:[EMAIL PROTECTED] Gesendet: Fr 29.02.2008 05:25 An: James Users List Betreff: Re: Spring integration as a Avalon component I'm currently spring from within my own Mailet as well, in my instance I have the mailet initializing its own context (I only have the one mailet) : public void init(MailetConfig mailetConfig) throws MessagingException { super.init(mailetConfig); if (LoggingUtils.noAppendersConfigured()) { // is has logging been initialised already? PropertyConfigurator.configureAndWatch(new LoggingUtils().getPropertiesFile().getPath(), LOG4J_TIMEOUT); } XmlBeanFactory springContext = new XmlBeanFactory( new ClassPathResource("/rmi-service-context.xml")); try { PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer(); Properties props = new Properties(); props.load(new FileInputStream("/etc/bulletinwireless/bulletinmail/bulletinmail.properties")); ppc.setProperties(props); ppc.postProcessBeanFactory(springContext); } catch (IOException e) { throw new MessagingException(e.getMessage()); } springContext.autowireBeanProperties(this, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true); } Seems to work for me... On 2/28/08, Guido Franz <[EMAIL PROTECTED]> wrote: > > 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 > > -- "The L in LAMP stands for Linux, not Looney" - Jonathan Schwartz, Sun Microsystems, Inc.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
