This content has been marked as final.
Show 2 replies
-
1. Re: Use @In annotation to get a existing component, but get null...
lvdberg Dec 22, 2010 4:01 AM (in response to ziyang)Hi,
I assume that you have different methods getAccountMissingCount() because I see two different signatures. The Seam interception only works on
directly called methods
or if youlookup
a component, so if that's not the case you will get a null,because Seam didn't had the chance toinject
the variable.Send some code on how you call the mentioned methods if you want some more help.
Leo
-
2. Re: Use @In annotation to get a existing component, but get null...
monkeyden Dec 22, 2010 4:18 PM (in response to ziyang)Unless you're overriding the existing Seam Identity object, using:
@Install(precedence=Install.APPLICATION)
for example, you might want to change the Seam component name of your CV2Identity object. Seam injects components by Seam component name and there is already one namedidentity
in the Seam framework, though it is namespaced (org.jboss.seam.security.identity
).You might also want to ensure that you aren't trying to do this in a class which has the BypassInterceptors annotation. Bijection is ignored with this annotation. If you are, use Component.getInstance(seamComponentName) instead.