Thanks for answering so fast!

I believed that I was doing what you have said but I had a problem with my
project configuration.

The problem that I have now is with:

@Resource
    private DeliveryChannel channel;

    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
        System.out.println("Received exchange: " + exchange);
        exchange.setStatus(ExchangeStatus.DONE);
        channel.send(exchange);
    }


Now I get a NullPointerException, when "channel.send(exchange)" is executed.
My problem is that the DeliveryChannel "channel" is not initialized. Am I
forgetting something (like something as "@Resource")?

Thanks again.


2008/1/22, Lars Heinemann <[EMAIL PROTECTED]>:
>
> Hi,
>
> where to put the bean class is clearly defined.
> In your SU you can configure via xbean.xml:
>
> <bean id="listenerBean"
> class="org.apache.servicemix.bean.beans.ListenerBean"/>
>
> This means that you have to place this bean class in your bean SU in a
> package called:
>   org.apache.servicemix.bean.beans
> and with the name:
>   ListenerBean
>
> So if you use eclipse for developing the path should be this:
>   <your project path>/src/org/apache/servicemix/bean/beans/
>
> Hopefully this will help you,
> Lars
>
>
> > Hi,
> >
> > I am trying an easy example with the bean component (the same that can
> be
> > find in http://servicemix.apache.org/servicemix-bean.html) but I do not
> know
> > where to put the bean class (in the example:
> > org.apache.servicemix.bean.beans.ListenerBean).
> > I have tried to put it directly in the classpath and in the service unit
> but
> > I get:
> > ...
> > Configuration problem: Bean class [
> > org.apache.servicemix.bean.beans.ListenerBean] not found
> > ...
> >
> > I am developing using Eclipse, and I am launchin servicemix using
> > org.codehaus.classworlds.Launcher.
> >
> > Thanks
> >
> >
>

Reply via email to