aspose file tools*
The moose likes JBoss/WildFly and the fly likes Setting session variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Setting session variables" Watch "Setting session variables" New topic
Author

Setting session variables

Liwuen Chew
Greenhorn

Joined: Mar 11, 2010
Posts: 24
Hi everyone! Right now I'm facing a new problem and don't know what to do...

I'm using Jboss with Hibernate (EJB3), and now I'm facing to the need of carrying a global variable for all the times the web service is consumed; I think it is called a "session variable".
What I need is that, when Jboss starts and deploys my ear, It needs to take a value from the database and keep this value as long as Jboss is up.
My main concern is that I don't know how to set up a session variable. I already tried with the @in and @out comments, but I think I might be doing something wrong.

Can you guys please show me how to set up a session variable properly? Thank you very much for all your help!

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setting session variables