File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Setting session variables" Watch "Setting session variables" New topic

Setting session variables

Liwuen Chew

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!

Consider Paul's rocket mass heater.
subject: Setting session variables
It's not a secret anymore!