Re: [jboss-user] [EJB 3.0] - Dependency Injection in EJB3
by jaikiran pai
jaikiran pai [http://community.jboss.org/people/jaikiran] replied to the discussion
"Dependency Injection in EJB3"
To view the discussion, visit: http://community.jboss.org/message/552053#552053
--------------------------------------------------------------
> Swamy Nathan wrote:
>
>
>
> 1. ) Can I inject a simple POJO Java bean/object using @javax.annotation.Resource into a EJB- Can we do this inside an EJB.
> @Resource
> private SimpleNotEjbType type;
>
>
>
Is the SimpleNotEjbType available in JNDI? If yes, then you can use the mappedName attribute of the @Resource to point to the jndi name of that resource and have it injected:
@Resource (mappedName="jndiname")
private SimpleNotEjbType type;
> Swamy Nathan wrote:
>
> 2. ) Can I inject a DataSource using @javax.annotation.Resource into a non-ejb POJO being invoked by my EJB?
> public class SimpleNotEjbType
> {
> @Resource(mappedName="MyDS")
> private DataSource ds;
> }
No, the EJB container will not inject the resources into that POJO class.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552053#552053]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
[JCA] - Failed to encode/decode password with name "pinaki" using SecureIdentityLoginModule
by Ravi Sankar
Ravi Sankar [http://community.jboss.org/people/ravisv] created the discussion
"Failed to encode/decode password with name "pinaki" using SecureIdentityLoginModule"
To view the discussion, visit: http://community.jboss.org/message/552049#552049
--------------------------------------------------------------
When trying to encode/decode a password with characters "pinaki" using "SecureIdentityLoginModule" from JBOSS-JCA.JAR, i am getting the following excpetion.
One of our customers are using this as a password. I am not getting this exception for any other passwords except "pinaki"
Password After encrption: "-4fb8f7c76b11ab"
> Exception in thread "main" javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
> at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
> at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
> at com.sun.crypto.provider.BlowfishCipher.engineDoFinal(DashoA13*..)
> at javax.crypto.Cipher.doFinal(DashoA13*..)
> at SecureIdentityLoginModule.decode(SecureIdentityLoginModule.java:39)
> at SecureIdentityLoginModule.main(SecureIdentityLoginModule.java:48)
Please help me to get this issue resolved.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552049#552049]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months