Results 1 to 8 of 8

Thread: Timer Service support for Web Services in EJB 2.1

  1. #1
    Join Date
    Apr 2010
    Posts
    84

    Timer Service support for Web Services in EJB 2.1

    I am trying to work on Timer Service in EJB 2.1. But I am not able to make it work properly. The reason behind that is I am not having much knowledge about it, so I am not able to do R and D. I just know that the EJB Timer Service is a container-managed service that can register the bean provider enterprise beans for timer callbacks that take place at a certain time, after a certain period of time or frequency. I am expecting some more explanation from your side. Hoping that someone hanging out there will help me soon.

  2. #2
    Join Date
    Jan 2009
    Posts
    143

    Re: Timer Service support for Web Services in EJB 2.1

    I think that you should also know about the features of EJB 2.1. The following is the short list of new features of EJB 2.1 :
    • Container-Managed Timer Service - The timer service provides rough, transactional, time-event notifications to model the business enterprise beans and can manage a higher level.
    • Support for Web Services - With the EJB 2.1 may be used stateless session beans to implement a Web service endpoint interface for a Web service endpoints.
    • Extended support of JMS - The architecture to support beyond the JMS message types by Message-Driven Beans was generalized.
    • EJB QL - Advanced EJB QL supports aggregate functions and result collation.

  3. #3
    Join Date
    Jan 2009
    Posts
    140

    Re: Timer Service support for Web Services in EJB 2.1

    The service is targeted to specific timer callback cycles. When in the preparation of the timer set time period has expired, calls the container-on ejbTimeout the method of the bean. Here are two examples of using the EJB Timer Service:
    1. A bean that sends a reminder Friday to all contractors to complete their time sheets.
    2. A bean that sends synchronization messages periodically to the clients.

  4. #4
    Join Date
    Dec 2008
    Posts
    161

    Re: Timer Service support for Web Services in EJB 2.1

    An enterprise bean accesses through its EJBContext interface to the timer service. The timer system provides methods for setting and deleting timers as well as for locating a bean associated timer. be to use the timer service must be implemented javax.ejb.TimedObject for each bean class interface. This interface contains only one method, the timer callback method ejbTimeout. A bean can delete the timer before the time runs out. In this case, the ejbTimeout method not called.

  5. #5
    Join Date
    Dec 2008
    Posts
    183

    Re: Timer Service support for Web Services in EJB 2.1

    Stateless session beans can include Web service clients. Generally, the session beans act as Web services, with a Web service client can call the stateless session bean using SOAP (Simple Object Access protocol). The endpoint interface for a Web Services Beans is described by the WSDL (Web Service Description Language). The bean provider chooses the endpoint interface of a Web service for a stateless session bean if he wants to provide the functionality of the bean as a Web service endpoint. The Web service client to send or receive messages via the SOAP.

  6. #6
    Join Date
    Mar 2008
    Posts
    672

    Re: Timer Service support for Web Services in EJB 2.1

    From a client, the stateless session bean is completely hidden behind the Web service endpoint. The client accesses the endpoint on the Web service functionality. For Java clients, the access to the endpoint as a JAX-RPC service endpoint using the JAX-RPC APIs for client-side display. To used as web services stateless session bean is accessed from different clients that regardless of platform and language.

  7. #7
    Join Date
    May 2008
    Posts
    2,297

    Re: Timer Service support for Web Services in EJB 2.1

    Both the body such as EJB session are likely to implement this interface, which allows them to declare the method to execute when the timer activated. In particular, it must implement the method ejbTimeout (Timer), which will be invoked by the Timer service when you activate it. This method contains the logic that we want to run.

  8. #8
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Timer Service support for Web Services in EJB 2.1

    All Timers management is done through TimerService class. This class, which is obtained from the EJB SessionContext have, is what allows the creation of timers in the instance of the EJB. Create a timer is very simple:
    Code:
     TimerService TimerService = context. GetTimerService (); 
    Timer timer = TimerService. createTimer (5000, "timer example");
    These lines create a timer that will run after you set 5000 milliseconds. Ie, 5000 milliseconds after this creation ejbTimeout run method ().

Similar Threads

  1. Sharepoint (MOSS) timer jobs and the timer service
    By MahaGuru in forum Office Setup
    Replies: 2
    Last Post: 01-03-2011, 09:08 AM
  2. Scheduling in EJB3 Timer Service
    By Cheng-Gong in forum Software Development
    Replies: 5
    Last Post: 24-07-2010, 06:06 AM
  3. Execute timer service in java
    By Messenger in forum Software Development
    Replies: 4
    Last Post: 20-07-2010, 01:27 PM
  4. Replies: 5
    Last Post: 14-03-2010, 04:41 AM
  5. Replies: 1
    Last Post: 28-08-2008, 04:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,712,503.26491 seconds with 17 queries