Hi Saurabh,
quote:
Dont explain with the definition that its a source code generation engine.I wanna know where it should be used and how can it simplify your task ?
Here there is a code extras from an SLSB class:
code:
/**
* Admin Manager Business Object.
*
* ...ejb.bean
* type="Stateless"
* display-name="Admin Manager EJB"
* description="Bean class for the AdminManager"
* view-type="remote"
* jndi-name="ejb/${appname}/AdminManager"
*
* ...author $Author $
* ...version $Revision$
*/
public abstract class AdminManagerBean implements SessionBean {
/**
* Creates a role with the given name
*
* ...param roleName the name of the role which should be created
* ...param roleDesc the role's description
*
* ...throws SystemException if an LDAP error occurs
*
* ...ejb.interface-method
* ...ejb.transaction method-intf="Remote" type="Supports"
*/
public void createRole(String roleName, String roleDesc) throws SystemException {
}
(Bolded tag are XDoclet specific tags). After running XDoclet the next files will be generated:
- The home interface
- The remote interface
- web-logic-ejb.xml
- ejb-jar.xml
Which simplifies the development quite a lot. Developers need only to focus implementing the business logic, which is actually a promise that J2EE has made (but not kept) in the first place.
quote:
How soon can i learn it?
As you can see it is pretty easy and it wont take you much to get familiar with XDoclet tags. You also can build your own tags, but thats advanced concepts that you can focus on latter on.
Regards.
valentintanase
| Wed, 16 Jul 2008 22:24:00 GMT |