I've got a happily working EJB3 MBD set up via the @MessageDriven and @ActivationConfigProperty annotations. I'm also using an @EJB annotation to inject a stateless session bean for entity access. Once again, EJB 3 has proven itself very easy to work with.
The only unmet requirement of my MDB at this time is an externally configurable string variable. This variable tells the bean where to create a file it will write out data to. The location the file is written to needs to be different between dev, test, and stage environments, so I'd like to place the value in a config or property file. What's the best way to do this in EJB3? I'm hoping there is a simple spring app-context like way to do this. I have no previous EJB experience, but I understand there is an ejb-jar.xml file used in the older specs for configuring beans. I'm guessing there is something similar in EJB3 but I haven't found a description of how to use it in JBoss-EJB3. Would ejb-jar.xml be the best way to add an injectable string value to my MDB in EJB3? If so, can someone point me to instructions or documentation on doing this? If using the ejb-jar.xml file, do I loose the ability to use the @ActivationConfigProperty annotation inside the bean (either annotation or xml configuration, but not both?)? Or is there another recommended way to inject configuration into an ejb3 bean? Thanks for the help, Jonn View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913429#3913429 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913429 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
