• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

keepstate is true and will not create new auto timers during deployment

 
Ranch Hand
Posts: 1738
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying Ivan's example of declarative scheduling.
I specified a timer in ejb-jar.xml like on p.228.
I got this error message from GlassFish 3.1.2:
"keepstate is true and will not create new auto timers during deployment".

What I tried:
1. I added a glassfish-ejb-jar.xml file in META-INF in TimerExample dynamic web project

2. Export TimerExample.jar
3. put it in the glassfish's bin folder, where asadmin.batch is
4. Type this command under directory where asadmin is : asadmin> deploy --name ScheduledStatelessSessionBean --keepstate=false TimerExample.jar

I don't get any output from the timer.
All I see from the Eclipse console is :


Info: No timers to be deleted for id: 93546707202080768
Info: Portable JNDI names for EJB ScheduledStatelessSessionBean : [java:global/ScheduledStatelessSessionBean/ScheduledStatelessSessionBean, java:global/ScheduledStatelessSessionBean/ScheduledStatelessSessionBean!com.ivan.scbcd6.ScheduledStatelessSessionBean]
Info: ScheduledStatelessSessionBean was successfully deployed in 359 milliseconds.



Any other idea how to fix the keepstate from true to false in glassfish ?

 
Himai Minh
Ranch Hand
Posts: 1738
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me answer my own question:
As suggested by stackoverflow.com , I added <persistent>false</persistent> to ejb-jar.xml.
I keep the glassfish-ejb-jar.xml as described above.
From Eclipse's server panel, I removed the deployed TimerExample from the server and cleaned the resources from the server.
I restarted Glassfish from Eclipse. It works.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!