The @Schedule annotation is used to mark an enterprise bean method as a timeout method according to the calendar schedule specified in the attributes of @Schedule. This annotation has elements that correspond to the calendar expressions and the persistent, info, and timezone elements.
Archive for March, 2010
What is the @Schedule annotation?
Author: Daisy WilliamsMar 31
What is the begin() method?
Author: Daisy WilliamsMar 30
The begin() method creates a new transaction and associates it with the current thread. This method belongs to the UserTransaction interface. The general form of this method is as follows:
public abstract void begin() throws IllegalStateException
This method will throw an IllegalStateException if the thread is already associated with a transaction.
What is getEJBLocalObject() method?
Author: Daisy WilliamsMar 29
The getEJBLocalObject() method is used to obtain a reference to the EJB local object that is currently associated with the instance and can only be called by an instance of an entity enterprise Bean. The instance must be associated with an EJB local object identity, i.e. in the ejbActivate, ejbPassivate, ejbPostCreate, ejbRemove, ejbLoad, ejbStore, and business methods. An instance can use this method when it wants to pass a reference to itself in a method argument or a result. The general format of this method is as follows:
public EJBLocalObject getEJBLocalObject() throws java.lang.IllegalStateException
What is the difference between the GET and POST method?
Author: Daisy WilliamsMar 27
The following table summarizes the differences between the Get and Post requests:
| Get Request | Post Request |
|---|---|
| Get is the default HTTP method. | POST is not the default HTTP method. |
| It is triggered when the HTML | It is triggered when the HTML |
| Its target resource can be static or dynamic. | Its target resource can be dynamic only. |
| The query string is appended as part of the URL after the “?” character. | The query string is passed as part of the body, at the end of the request header. |
| It does not have a body. | It has a body. |
| It is used for just retrieving data from a requested URL. | It is used to update information. |
| It can be bookmarked. | It cannot be bookmarked. |