Can you check that your SU does not include the common-annotation jar wich
includes the @Resource annotation ?
If it does, there will be a problem where the two annotations won't be from
the same classloader and the component will not recognize it, hence no
injection will occur.
Other than that, I've no clear idea why it would not work.

On Wed, Apr 9, 2008 at 2:14 PM, Andrea Zoppello <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I've start to work to port the features of Lw-container pojo to sm bean,
> but i've
> find a problem.
>
> I've developed and deployed a simple process containing a simple Bean
> where
> i've used the following syntax:
>
> @Resource
>  private DeliveryChannel channel;
>
> to get the channel injected to my pojo
>
> The code of the onMessage method looks like:
>
> public void onMessageExchange(MessageExchange exchange)
>          throws MessagingException {
>      if (channel == null){
>          System.out.println(" **************** Channel is null
> ****************");
>      }else{
>           System.out.println(" **************** Channel is not null
> ****************");
>      }
> }
>
>
> I've no problem to deploy this, the problem is that the channel is always
> null, it means it's not
> injected correctly.
>
> Any Idea on that??
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to