wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes JMS/EJB3.0/MDB  user password question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JMS/EJB3.0/MDB  user password question" Watch "JMS/EJB3.0/MDB  user password question" New topic
Author

JMS/EJB3.0/MDB user password question

Harsha Jay
Greenhorn

Joined: Sep 25, 2001
Posts: 14
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

Joined: Sep 25, 2001
Posts: 14
anyone ?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10068
    
163

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


I am not much familiar with this one. What exactly is this property set for?


[My Blog] [JavaRanch Journal]
Harsha Jay
Greenhorn

Joined: Sep 25, 2001
Posts: 14
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

Joined: Mar 09, 2011
Posts: 1
-- 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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS/EJB3.0/MDB user password question