• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS/EJB3.0/MDB user password question

 
Harsha Jay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the prev ejb 2.x the activation config property took the user name password, if I use annotations to set the activationproperty

like this @ActivationConfigProperty(propertyName = "user", propertyValue = "subscriber"),

how can parameterize this value?

I tried doing this see the attribute properties to pass in username and password, but it simply ignores this , why?



<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
<attribute name="ProviderName">d2</attribute>
<attribute name="ProviderAdapterClass">
org.jboss.jms.jndi.JNDIProviderAdapter
</attribute>
<!-- The combined connection factory -->
<attribute name="FactoryRef">SomeConnectionFactory</attribute>
<!-- The queue connection factory -->
<attribute name="QueueFactoryRef">SomeConnectionFactory</attribute>
<!-- The topic factory -->
<attribute name="TopicFactoryRef">SomeConnectionFactory</attribute>
<!-- Uncomment to use HAJNDI to access JMS -->
<attribute name="Properties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces
java.naming.provider.url=localhost:11099
java.naming.security.principal=user
java.naming.security.credentials=pass
</attribute>
[ November 24, 2008: Message edited by: Harsha Jay ]
 
Harsha Jay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ActivationConfigProperty(propertyName = "user", propertyValue = "subscriber")


I am not much familiar with this one. What exactly is this property set for?
 
Harsha Jay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright I fixed the problem...

1.) I used the EJB 3.0 MDB as message driven bean with all the works and provide only two required annotations (destinationtype and destination)

2.) WE CANNOT PASS VALUES TO THE ANNOTATIONs (SHAME!!!)

3.) So I used the ejb-jar.xml to define additional properties for the user/password so that the values can adjusted by the systems groups to deploy to their tiers.

LIFE IS GOOD!

Happy Thanksgiving!
 
joseph valerio
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-- 2.) WE CANNOT PASS VALUES TO THE ANNOTATIONs (SHAME!!!)
But you can supply annotations via AOP with the right values, and *-aop.xml can be an external config file, getting exactly what you want, with out setting global system variables with usernames and passwords.

http://stackoverflow.com/questions/308188/configurable-values-to-mdb-annotations

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic