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

  • Home
  • SEARCH
  • 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 6974531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:14:59+00:00 2026-05-27T17:14:59+00:00

I have a problem with this setup and I can’t even view the logs.

  • 0

I have a problem with this setup and I can’t even view the logs.

This is my @Singleton @Startup EJB:

@Singleton
@Startup
@DependsOn("SchedulerEJB")
public class SchedulerStartUp {

    private static Logger log = Logger.getLogger(SchedulerStartUp.class);

    @EJB
    SchedulerEJB schedEJB;  

    @PostConstruct
    public void atStartup() {
       log.info("startUp")
       System.out.println("startUp");

       schedEJB.cancelTimer("EBlastScheduler");
       schedEJB.createTimer("*/1", "*", "*");
    }
}

The SchedulerEJB:

 @Stateless
 public class SchedulerEJB {

    @Resource
    TimerService timerService;         

    public cancelTimer(String timerInfo){/*...*/}

    public createTimer(String sec, String min, String hour) {/*...*/}

    @Timeout
    public void execute(Timer timer) {/*...*/}
 }

Maven pom:

 //Been Using Glassfishv3.0.1 and EJB3.1 with a dependency of:
 <dependency>
     <groupId>javax</groupId>
     <artifactId>javaee-api</artifactId>
     <version>6.0</version>
     <scope>provided</scope>
 </dependency>
  • 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-27T17:14:59+00:00Added an answer on May 27, 2026 at 5:14 pm

    You have invalid type of bean as an attribute of @DependsOn. DependsOn is for expressing dependency between two Singleton session beans, not between Singleton and Stateless. You should change SchedulerEJB to be Singleton or remove dependency.

    If you decide change SchedulerEJB to Singleton, then @DepensOn is also not needed, because (from EJB 3.1 specification):

    Note that if one Singleton merely needs to invoke another Singleton
    from its PostConstruct method, no explicit ordering metadata is
    required. In that case, the first Singleton would merely use an ejb
    reference to invoke the target Singleton. There, the acquisition of
    the ejb reference (either through injection or lookup) does not
    necessarily imply the actual creation of the corresponding Singleton
    bean instance.

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

Sidebar

Related Questions

I have this problem, I can create a setup for my app/database but everyone
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I'm having a little problem with this setup here I have a list of
I have this problem where I can't get my dynamic data web app to
I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)
Hi i have problem with this code, i found it on the internet and
i am a beginner and i have a problem : this code doesnt compile
I have this problem I'm hoping someone knows the answer to. I have an
I have this problem where I open Visual Studio and the internal windows are
i have this problem to find a particular xml node l have post this

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.