You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Soumya <so...@yahoo.co.in> on 2009/07/13 16:00:33 UTC

annotation problem with using Bean component

Hi everybody,

I cam across a weird problem today.

I was trying to develop a servicemix bean component today.
check 
http://servicemix.apache.org/servicemix-bean.html

As per that I was using the annotations 
                @Resource
		private DeliveryChannel channel;
		@Resource
		private ComponentContext context;

That is supposed to be supported by the import
import javax.annotation.Resource

However I am using JDK version 1.5.13, which doesn't seem to support that.

So can I not use bean component with 1.5?
Please do let me know.

Thanks in advance.
Soumya



      ICC World Twenty20 England &#39;09 exclusively on YAHOO! CRICKET http://cricket.yahoo.com


Re: annotation problem with using Bean component

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Soumya,

did you use an IBM or a SUN JDK ?

Take a look on:
http://svn.apache.org/repos/asf/servicemix/smx3/trunk/samples/database-bean/database-bean-su/src/main/java/org/apache/servicemix/samples/DatabaseQueryBean.java

It's a sample based on servicemix-bean.

It uses @Resource annotation.

I have builded it right now using this Sun JDK:
java version "1.5.0_17"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)

Could you send the output of java -version ?

Thanks
Regards

Soumya wrote:
> Hi everybody,
> 
> I cam across a weird problem today.
> 
> I was trying to develop a servicemix bean component today.
> check 
> http://servicemix.apache.org/servicemix-bean.html
> 
> As per that I was using the annotations 
>                 @Resource
> 		private DeliveryChannel channel;
> 		@Resource
> 		private ComponentContext context;
> 
> That is supposed to be supported by the import
> import javax.annotation.Resource
> 
> However I am using JDK version 1.5.13, which doesn't seem to support that.
> 
> So can I not use bean component with 1.5?
> Please do let me know.
> 
> Thanks in advance.
> Soumya
> 
> 
> 
>       ICC World Twenty20 England &#39;09 exclusively on YAHOO! CRICKET http://cricket.yahoo.com
> 

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086