I have tried to write a ejb singleton with attribute  :
@Named
@Singleton
@Startup
 public class MySingletonEnvVarPropertiesManager {

Private String MYUSERDB, MYDBPASS, MYDBHOST, MYDBPORT, MYDBNAMEDB
@PostCreation
Public void init (){
MYUSERDB=System.getEnv ("OPENSHIFT_MYSQL_USER");
System.setPropertie ("MYUSERDB", MYUSERDB);

// i use same similar code for get other environment variables and set the
sistem proprties


}

I have also write the methods set and getter for all string into my
singlrton.?

Or into resources.xml at resource i can  get the system properties from:
$(MYUSERDB); ????

Or i have to get the valye from method gettere of singleton with:
$(mysingletonEnvVarPropertoesManager.MYUSERDB).?..?.

Or the singleton not work ?

Or the tomcat listener  set the properties at webapplication startup or at
global server startup ?...




--
View this message in context: 
http://openejb.979440.n4.nabble.com/Re-i-have-tried-but-not-work-tp4664234p4664311.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to