This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 1756
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: 1756
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.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!