Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6815549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:49:15+00:00 2026-05-26T20:49:15+00:00

In EJB3 Timer Service, I can create the timer with the timerService.createTimer(…) function, but

  • 0

In EJB3 Timer Service, I can create the timer with the timerService.createTimer(...)function, but the question is where I can use it?
As I know, I can’t do it in Session Bean’s lifecycle function, like @PostConstruct function.

I also read it can’t be called in Stateful session bean?
Is there anything else I should pay attention about createing timer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:49:15+00:00Added an answer on May 26, 2026 at 8:49 pm

    I guess the most important thing to be aware of is that timers are transactional objects; it means, if you create a timer in a transaction that will roll back, the timer creation will be rolled back as well. This also implies that they must be called in a transaction context, and there is none in @PostConstruct.

    Oh, and as you know, you need a TimerService to create a timer, so you usually will be using it in managed classes, so you can inject it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a timer EJB3 when a stateless bean is created in
I'm just about to use the new EJB3 TimerService (as part of Java EE
I have an EJB3 bean deployed as a web service in JBoss 4.2.2. In
I have an EJB3 stateless session bean that uses some other ejbs to do
I was able to get some hands on EJB3.0 Timer Service.I was able to
I am trying to use the new EJB3.1 feature where one can deploy an
I am attempting to create a EJB3.0 container-managed persistence bean and am having issues
I use EJB3.1 TimerService to schedule timers in Java. Is there a common way
Timers are created in EJB3 using the TimerService.createTimer() , and are then run via
I'm implementing stateless session bean ejb3 in glassfish server using netbeans. First time, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.