Adams Bros Blog

21Jan/100

EJB3 @RolesAllowed, annotation type not applicable to this kind of declaration

I'm just learning EJB3, and I'm stumbling here and there.  When developing an EJB object, I had a problem where the compiler was giving me an error that says "annotation type not applicable to this kind of declaration".  It was on a line like the following...

@RolesAllowed({"admin", "entryclerk"})

Obviously this is normal to use on a method.  Unfortunately, I had it defined on not just any method, but the constructor method of my Java class.  It took me awhile to figure out why it was happening, so I thought would spare others a bit of grief.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

 

No trackbacks yet.