You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(178) |
Feb
(169) |
Mar
(286) |
Apr
(117) |
May
(98) |
Jun
(68) |
Jul
(63) |
Aug
(121) |
Sep
(88) |
Oct
(124) |
Nov
(2) |
Dec
(111) |
2007 |
Jan
(224) |
Feb
(69) |
Mar
(10) |
Apr
(72) |
May
(7) |
Jun
(21) |
Jul
(33) |
Aug
(35) |
Sep
(12) |
Oct
(22) |
Nov
(5) |
Dec
(6) |
2008 |
Jan
(2) |
Feb
(10) |
Mar
(39) |
Apr
(58) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(10) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Eric C <ecr...@us...> - 2006-03-04 20:11:36
|
User: ecrutchfield Date: 06/03/04 12:11:35 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp/maven2 - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:36
|
User: ecrutchfield Date: 06/03/04 12:11:33 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates/csharp - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:35
|
User: ecrutchfield Date: 06/03/04 12:11:32 plugins/andromdapp/projects/csharp/maven2/src/main/resources/templates - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:33
|
User: ecrutchfield Date: 06/03/04 12:11:31 plugins/andromdapp/projects/csharp/maven2/src/main/resources/META-INF/andromdapp - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:32
|
User: ecrutchfield Date: 06/03/04 12:11:31 plugins/andromdapp/projects/csharp/maven2/src/main/resources/META-INF - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:32
|
User: ecrutchfield Date: 06/03/04 12:11:31 plugins/andromdapp/projects/csharp/maven2/src/main/resources - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:31
|
User: ecrutchfield Date: 06/03/04 12:11:27 plugins/andromdapp/projects/csharp/maven2/src/main - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:31
|
User: ecrutchfield Date: 06/03/04 12:11:26 plugins/andromdapp/projects/csharp/maven2/src - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:27
|
User: ecrutchfield Date: 06/03/04 12:11:25 plugins/andromdapp/projects - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:27
|
User: ecrutchfield Date: 06/03/04 12:11:24 plugins/andromdapp - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:27
|
User: ecrutchfield Date: 06/03/04 12:11:26 plugins/andromdapp/projects/csharp/maven2 - New directory |
From: Eric C <ecr...@us...> - 2006-03-04 20:11:26
|
User: ecrutchfield Date: 06/03/04 12:11:25 plugins/andromdapp/projects/csharp - New directory |
From: Vance K. <va...@us...> - 2006-03-03 15:29:15
|
User: vancek Date: 06/03/03 07:29:13 Modified: andromda-ejb3/src/site site.xml Log: renamed Environment Entry Injections item to Injection Revision Changes Path 1.6 +1 -1 cartridges/andromda-ejb3/src/site/site.xml Index: site.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/site.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- site.xml 3 Mar 2006 04:08:11 -0000 1.5 +++ site.xml 3 Mar 2006 15:29:12 -0000 1.6 @@ -27,7 +27,7 @@ <item name="Security" href="howto8.html"/> <item name="Inheritance" href="howto9.html"/> <item name="Message-Driven Beans" href="howto10.html"/> - <item name="Environment Entry Injections" href="howto11.html"/> + <item name="Injection" href="howto11.html"/> <item name="Service Delegates" href="howto12.html"/> <item name="Interceptors" href="howto13.html"/> <item name="Lifecycle Callback" href="howto14.html"/> |
From: Vance K. <va...@us...> - 2006-03-03 15:28:16
|
User: vancek Date: 06/03/03 07:28:15 Modified: andromda-ejb3/src/site/xdoc howto3.xml Log: modified the injection subsections Revision Changes Path 1.3 +8 -5 cartridges/andromda-ejb3/src/site/xdoc/howto3.xml Index: howto3.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto3.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- howto3.xml 8 Feb 2006 10:19:38 -0000 1.2 +++ howto3.xml 3 Mar 2006 15:28:15 -0000 1.3 @@ -126,15 +126,16 @@ To find out more information, click on <a href="howto8.html">Security</a>. </p> </subsection> - <a name="Resource_Injection"/> - <subsection name="Resource Injections"> + <a name="Environment_Entry_Injection"/> + <subsection name="Environment Entry Injections"> <p> To inject an environment entry resource value, model a service attribute with classifer scope and set the attribute stereotype to <![CDATA[<<EnvEntry>>]]>. The environment entries will be defined in the session bean class and configured in the ejb-jar.xml deployment descriptor. You must define a default value for these attributes in the model. Refer to - <a href="howto11.html">Environment Entry Injections</a> for further information. + <a href="howto11.html#Simple_Environment_Entry_Injection">Environment Entry Injections</a> + for further information. </p> </subsection> <a name="Nullable_Parameter"/> @@ -150,7 +151,8 @@ As you saw in the example in this howto, a session bean delegate class is generated for every session bean. A client invokes the session bean's business methods via the delegate class, acting like a proxy via the service locator class. Both the service delegate and - service locator classes are regenerated every time AndroMDA is run. + service locator classes are regenerated every time AndroMDA is run. You can find out + more information about session delegates from <a href="howto12.html">here</a>. </p> </subsection> <a name="Listener_Callback"/> @@ -223,7 +225,8 @@ <p> To inject another session bean into the current session bean, simply model a dependency from the source session bean (which will contain the <code>@javax.annotation.EJB</code> - annotation) to the target session bean. + annotation) to the target session bean. For more information on dependency injections, + click <a href="howto11.html#Dependency_Injection">here</a>. </p> </subsection> <a name="JMS_Injections"/> |
From: Vance K. <va...@us...> - 2006-03-03 15:27:09
|
User: vancek Date: 06/03/03 07:27:07 Modified: andromda-ejb3/src/site/xdoc howto14.xml Log: converted the lifecycle stereotypes into tables from lists Revision Changes Path 1.2 +127 -67 cartridges/andromda-ejb3/src/site/xdoc/howto14.xml Index: howto14.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto14.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto14.xml 3 Mar 2006 04:07:09 -0000 1.1 +++ howto14.xml 3 Mar 2006 15:27:06 -0000 1.2 @@ -23,35 +23,63 @@ You can define any number of the following callbacks in an entity bean by modelling the appropriate stereotype on an entity operation. You can only define 1 lifecycle callback stereotype per entity operation. - <ul> - <li> - PrePersist - <![CDATA[<<PrePersist>>]]> - Invoked before the entity is created in + <table> + <tr> + <td>PrePersist</td> + <td><![CDATA[<<PrePersist>>]]></td> + <td> + Invoked before the entity is created in the database and will cascade to all entities by way of the cascaded operation. - </li> - <li> - PostPersist - <![CDATA[<<PostPersist>>]]> - Invoked after the entity is created in + </td> + </tr> + <tr> + <td>PostPersist</td> + <td><![CDATA[<<PostPersist>>]]></td> + <td> + Invoked after the entity is created in the database and will cascade to all entities by way of the cascaded operation. - </li> - <li> - PreRemove - <![CDATA[[<<PreRemove>>]]> - Invoked before the entity is deleted in + </td> + </tr> + <tr> + <td>PreRemove</td> + <td><![CDATA[<<PreRemove>>]]></td> + <td> + Invoked before the entity is deleted in the database and will cascade to all entities by way of the cascaded operation. - </li> - <li> - PostRemove - <![CDATA[<<PostRemove>>]]> - Invoked after the entity is deleted in + </td> + </tr> + <tr> + <td>PostRemove</td> + <td><![CDATA[<<PostRemove>>]]></td> + <td> + Invoked after the entity is deleted in the database and will cascade to all entities by way of the cascaded operation. - </li> - <li> - PreUpdate - <![CDATA[<<PreUpdate>>]]> - Occurs right before the database is updated. - </li> - <li> - PostUpdate - <![CDATA[<<PostUpdate>>]]> - Occurs immediately after the database + </td> + </tr> + <tr> + <td>PreUpdate</td> + <td><![CDATA[<<PreUpdate>>]]></td> + <td> + Occurs right before the database is updated. + </td> + </tr> + <tr> + <td>PostUpdate</td> + <td><![CDATA[<<PostUpdate>>]]></td> + <td> + Occurs immediately after the database has been updated. - </li> - <li> - PostLoad - <![CDATA[<<PostLoad>>]]> - Occurs right after the data has been loaded + </td> + </tr> + <tr> + <td>PostLoad</td> + <td><![CDATA[<<PostLoad>>]]></td> + <td> + Occurs right after the data has been loaded from the database and associated with the entity. - </li> - </ul> + </td> + </tr> + </table> </p> <p> Due to the limitations of the EJB3 cartridge when it comes to @@ -80,38 +108,62 @@ <p> The following lifecycle callback for <b>stateless</b> session beans and the corresponding stereotype you need to model are: - <ul> - <li> - PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first + <table> + <tr> + <td>PostConstruct</td> + <td><![CDATA[<<PostConstruct>>]]></td> + <td> + Invoked when the bean is first created and after the dependency injection is completed. - </li> - <li> - PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the + </td> + </tr> + <tr> + <td>PreDestroy</td> + <td><![CDATA[<<PreDestroy>>]]></td> + <td> + Invoked when the bean is removed from the pool or destroyed. - </li> - </ul> + </td> + </tr> + </table> </p> <p> The following lifecycle callback for <b>stateful</b> session beans and the corresponding stereotype you need to model are: - <ul> - <li> - PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first + <table> + <tr> + <td>PostConstruct</td> + <td><![CDATA[<<PostConstruct>>]]></td> + <td> + Invoked when the bean is first created and after the dependency injection is completed. - </li> - <li> - PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the + </td> + </tr> + <tr> + <td>PreDestroy</td> + <td><![CDATA[<<PreDestroy>>]]></td> + <td> + Invoked when the bean is removed from the pool or destroyed. - </li> - <li> - PostActivate - <![CDATA[[<<PostActivate>>]]> - Invoked when the bean has just + </td> + </tr> + <tr> + <td>PostActivate</td> + <td><![CDATA[<<PostActivate>>]]></td> + <td> + Invoked when the bean has just been reactivated. - </li> - <li> - PrePassivate - <![CDATA[<<PrePassivate>>]]> - Invoked just before the container + </td> + </tr> + <tr> + <td>PrePassivate</td> + <td><![CDATA[<<PrePassivate>>]]></td> + <td> + Invoked just before the container passivates the bean instance. - </li> - </ul> + </td> + </tr> + </table> </p> <p> To seperate out the callback for the session bean into an <b>interceptor</b> class, simply model the @@ -134,16 +186,24 @@ <p> The following lifecycle callback for <b>stateless</b> session beans and the corresponding stereotype you need to model are: - <ul> - <li> - PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first + <table> + <tr> + <td>PostConstruct</td> + <td><![CDATA[<<PostConstruct>>]]></td> + <td> + Invoked when the bean is first created and after the dependency injection is completed. - </li> - <li> - PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the + </td> + </tr> + <tr> + <td>PreDestroy</td> + <td><![CDATA[<<PreDestroy>>]]></td> + <td> + Invoked when the bean is removed from the pool or destroyed. - </li> - </ul> + </td> + </tr> + </table> </p> <p> You can follow the same process as in <a href="howto14.html#Session_Bean_Callbacks">session bean</a> |
From: Vance K. <va...@us...> - 2006-03-03 15:25:52
|
User: vancek Date: 06/03/03 07:25:51 Added: andromda-ejb3/src/site/xdoc howto11.xml Log: initial revision Revision Changes Path 1.1 cartridges/andromda-ejb3/src/site/xdoc/howto11.xml Index: howto11.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="va...@us...">Vance Karimi</author> <title>AndroMDA - EJB3 - Environment Entry Injection</title> </properties> <body> <section name="Injection"> <p> The EJB 3.0 spec allows different types of injections such as <i>dependency injection and simple environment entry injections.</i> We will discuss how the EJB3 cartridge handles these injections differently. </p> <a name="Dependency_Injection"/> <subsection name="Dependency Injection"> <p> To inject dependencies using the EJB3 cartridge, simply model a dependency from the source class to the injected target class where each class has a suitable stereotype associated with it. </p> <p> You can inject a session bean instance into a session or a message-driven bean by drawing a dependency from the source session bean to the target session or message-driven bean. The source bean will include the <code>@EJB</code> annotation on the declared field. Upon creation of the source bean instance, the EJB container will set the instance of the injected destination bean using the JNDI name of the referenced EJB. </p> <p> The injected session bean instance name is simply the name of the target session bean with lower case first character. </p> <p> The EJB 3.0 spec allows resource injections using the <code>@Resource</code> annotation and the EJB3 cartridge uses this feature in a few ways. </p> <p> Firstly, all session beans automatically inject the <code>SessionContext</code> using the <code>@Resource</code> annotation into the instance <code>context</code> using a <code>protected</code> visibility. You can then use this <code>SessionContext</code> in the session bean implementation. </p> <p> If a session bean is marked for bean managed transaction demarcation by modelling the <code>@andromda.ejb.transaction.management</code> tagged value set to <code>BEAN</code>, then the EJB3 cartridge will automatically inject an instance of <code>UserTransaction</code> into the variable <code>userTrans</code> using a <code>protected</code> visibility. You can then use this <code>UserTransaction</code> instance in the session bean implementation. </p> <p> The EJB3 cartridge will also use the <code>@Resource</code> annotation to setup an instance of the appropriate <code>ConnectionFactory</code> and <code>Destination</code> objects for seding message to JMS queues where you have servicing message-driven beans. By modelling a dependency from the source session bean to the target message-driven bean, be it a MDB servicing a <code>Topic</code> or <code>Queue</code>, all the necessary injections are generated. You can find an example in the <a href="howto10.html">message-driven</a> howto. </p> </subsection> <a name="Simple_Environment_Entry_Injection"/> <subsection name="Simple Environment Entry Injection"> <p> Setting up an environment entry configuration parameter is very simple using the EJB3 cartridge. The environment entry value may have one of the following Java types: <ul> <li>String</li> <li>Character</li> <li>Integer</li> <li>Boolean</li> <li>Double</li> <li>Byte</li> <li>Short</li> <li>Long</li> <li>Float</li> </ul> </p> <p> To inject an environment entry resource value, model a service or message-driven bean attribute with <i>classifer</i> scope and set the attribute stereotype to <![CDATA[<<EnvEntry>>]]>. The environment entries will be defined in the session or message-driven bean class and configured in the ejb-jar.xml deployment descriptor. You must define a default value for these attributes in the model. </p> <p> The following example illustrates how you can inject environment entries into session beans. </p> <p> <img src="images/org/andromda/test/11/a/uml.gif"/> </p> <p> <ul> <li class="gen">Auto-generated source that does not need manual editing</li> <li class="impl">Auto-generated source that should be edited manually</li> <li class="changed">File that is affected by the modifications applied in this section</li> </ul> </p> <p> <ul> <li class="gen"><a href="src/org/andromda/test/howto11/a/CarEmbeddable.java.txt"><code>CarEmbeddable.java</code></a></li> <li class="impl"><a href="src/org/andromda/test/howto11/a/Car.java.txt"><code>Car.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/CarType.java.txt"><code>CarType.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/PersonEmbeddable.java.txt"><code>PersonEmbeddable.java</code></a></li> <li class="impl"><a href="src/org/andromda/test/howto11/a/Person.java.txt"><code>Person.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/ServiceLocator.java.txt"><code>ServiceLocator.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto11/a/RentalServiceBean.java.txt"><code>RentalServiceBean.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/RentalServiceRemote.java.txt"><code>RentalServiceRemote.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/RentalServiceDelegate.java.txt"><code>RentalServiceDelegate.java</code></a></li> <li class="impl"><a href="src/org/andromda/test/howto11/a/RentalServiceBeanImpl.java.txt"><code>RentalServiceBeanImpl.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/RentalServiceException.java.txt"><code>RentalServiceException.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/RentalException.java.txt"><code>RentalException.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto11/a/ejb-jar.xml.txt"><code>ejb-jar.xml</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto11/a/jboss.xml.txt"><code>jboss.xml</code></a></li> </ul> </p> <p> The two important files to look at are <code>RentalServiceBean.java</code> and <code>ejb-jar.xml</code>. The <code>RentalServiceBean.java</code> injects the resource using the <code>@Resource</code> annotation and specifies the name property corresponding to the <code>env-entry-name</code> in <code>ejb-jar.xml</code> for the environment entry. </p> </subsection> </section> <section name="Next"> <p> To find out how service delegates work, click <a href="howto12.html">here</a>. </p> </section> </body> </document> |
From: Vance K. <va...@us...> - 2006-03-03 15:25:28
|
User: vancek Date: 06/03/03 07:25:26 Modified: andromda-ejb3/src/site/xdoc howto.xml Log: added Injection list Revision Changes Path 1.6 +8 -1 cartridges/andromda-ejb3/src/site/xdoc/howto.xml Index: howto.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- howto.xml 3 Mar 2006 04:05:53 -0000 1.5 +++ howto.xml 3 Mar 2006 15:25:26 -0000 1.6 @@ -61,7 +61,7 @@ <li><a href="howto3.html#View_Interface">View Interfaces</a></li> <li><a href="howto3.html#Transactions">Transactions</a></li> <li><a href="howto3.html#Security">Security</a></li> - <li><a href="howto3.html#Resource_Injection">Resource Injections</a></li> + <li><a href="howto3.html#Environment_Entry_Injection">Environment Entry Injections</a></li> <li><a href="howto3.html#Nullable_Parameter">Nullable Parameters</a></li> <li><a href="howto3.html#Session_Delegate">Session Delegate</a></li> <li><a href="howto3.html#Listener_Callback">Listener Callback</a></li> @@ -115,6 +115,13 @@ </ul> </li> <li> + <a href="howto11.html">Injection</a> + <ul> + <li><a href="howto11.html#Dependency_Injection">Dependency Injection</a></li> + <li><a href="howto11.html#Simple_Environment_Entry_Injection">Simple Environment Entry Injection</a></li> + </ul> + </li> + <li> <a href="howto14.html">Lifecycle Callbacks</a> <ul> <li><a href="howto14.html#Entity_Bean_Callbacks">Entity Bean Callbacks</a></li> |
From: Vance K. <va...@us...> - 2006-03-03 15:24:44
|
User: vancek Date: 06/03/03 07:24:33 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/11 - New directory |
From: Vance K. <va...@us...> - 2006-03-03 15:24:42
|
User: vancek Date: 06/03/03 07:24:41 Added: andromda-ejb3/src/site/resources/images/org/andromda/test/11/a uml.gif Log: initial revision Revision Changes Path 1.1 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/11/a/uml.gif <<Binary file>> |
From: Vance K. <va...@us...> - 2006-03-03 15:24:34
|
User: vancek Date: 06/03/03 07:24:33 cartridges/andromda-ejb3/src/site/resources/images/org/andromda/test/11/a - New directory |
From: Vance K. <va...@us...> - 2006-03-03 04:08:15
|
User: vancek Date: 06/03/02 20:08:11 Modified: andromda-ejb3/src/site site.xml Log: reverted last change - added lifecycle callback item Revision Changes Path 1.5 +3 -2 cartridges/andromda-ejb3/src/site/site.xml Index: site.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/site.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- site.xml 25 Feb 2006 14:51:54 -0000 1.4 +++ site.xml 3 Mar 2006 04:08:11 -0000 1.5 @@ -30,8 +30,9 @@ <item name="Environment Entry Injections" href="howto11.html"/> <item name="Service Delegates" href="howto12.html"/> <item name="Interceptors" href="howto13.html"/> - <item name="Transactions" href="howto14.html"/> - <item name="Manageable Entities" href="howto15.html"/> + <item name="Lifecycle Callback" href="howto14.html"/> + <item name="Transactions" href="howto15.html"/> + <item name="Manageable Entities" href="howto16.html"/> <item name="Tips & Tricks" href="tips.html"/> </menu> </body> |
From: Vance K. <va...@us...> - 2006-03-03 04:07:38
|
User: vancek Date: 06/03/02 20:06:51 Modified: andromda-ejb3/src/site/xdoc howto10.xml Log: added bits on lifecycle callback with a reference Revision Changes Path 1.2 +5 -3 cartridges/andromda-ejb3/src/site/xdoc/howto10.xml Index: howto10.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto10.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto10.xml 25 Feb 2006 14:48:37 -0000 1.1 +++ howto10.xml 3 Mar 2006 04:06:50 -0000 1.2 @@ -164,9 +164,11 @@ <a name="Listener_Interceptor"/> <subsection name="Listener Interceptor"> <p> - Message driven beans have lifecycle callback interceptor methods which can be defined in a separate - interceptor class using the EJB3 cartridge. To find out more information on this, click on - <a href="howto13.html">interceptors</a>. + Message driven beans have lifecycle callback interceptor methods or regular interceptors which + can be defined in a separate interceptor class using the EJB3 cartridge. To find out more + information on interceptors, click on <a href="howto13.html">interceptors</a>. + To find out more information on lifecycle callbacks, click on + <a href="howto14.html">lifecycle callbacks</a>. </p> </subsection> <a name="Transaction_Context"/> |
From: Vance K. <va...@us...> - 2006-03-03 04:07:17
|
User: vancek Date: 06/03/02 20:07:10 Added: andromda-ejb3/src/site/xdoc howto14.xml Log: initial revision Revision Changes Path 1.1 cartridges/andromda-ejb3/src/site/xdoc/howto14.xml Index: howto14.xml =================================================================== <?xml version="1.0" encoding="iso-8859-1"?> <document> <properties> <author email="va...@us...">Vance Karimi</author> <title>AndroMDA - EJB3 - Lifecycle Callbacks</title> </properties> <body> <section name="Lifecycle Callbacks"> <p> There are a couple of different ways to define the lifecycle callbacks using the EJB3 cartridge. This howto will provide the necessary details on how you can implement the callback handlers for entity, session and message-driven beans. </p> <p> You have two basic choices on how you want to implement the lifecycle callbacks. You can annotate methods in the bean class to indicate the individual callback or you can separate out the callback implemention to a listener class for entity beans or interceptor for session and message-driven beans. These options are discussed below. </p> <a name="Entity_Bean_Callbacks"/> <subsection name="Entity Bean Callbacks"> <p> You can define any number of the following callbacks in an entity bean by modelling the appropriate stereotype on an entity operation. You can only define 1 lifecycle callback stereotype per entity operation. <ul> <li> PrePersist - <![CDATA[<<PrePersist>>]]> - Invoked before the entity is created in the database and will cascade to all entities by way of the cascaded operation. </li> <li> PostPersist - <![CDATA[<<PostPersist>>]]> - Invoked after the entity is created in the database and will cascade to all entities by way of the cascaded operation. </li> <li> PreRemove - <![CDATA[[<<PreRemove>>]]> - Invoked before the entity is deleted in the database and will cascade to all entities by way of the cascaded operation. </li> <li> PostRemove - <![CDATA[<<PostRemove>>]]> - Invoked after the entity is deleted in the database and will cascade to all entities by way of the cascaded operation. </li> <li> PreUpdate - <![CDATA[<<PreUpdate>>]]> - Occurs right before the database is updated. </li> <li> PostUpdate - <![CDATA[<<PostUpdate>>]]> - Occurs immediately after the database has been updated. </li> <li> PostLoad - <![CDATA[<<PostLoad>>]]> - Occurs right after the data has been loaded from the database and associated with the entity. </li> </ul> </p> <p> Due to the limitations of the EJB3 cartridge when it comes to <a href="howto9.html">inheritance</a>, you may need to assign a callback listener class to the entity. In an entity inheritance hierarchy, there are times where you do not have an implementation class for the entity and therefore do not have the ability to implement the lifecycle callback if you model the callback stereotype on the entity operation. </p> <p> To seperate out the callback for the entity into an entity listener class, simply model the <![CDATA[<<Listener>>]]> stereotype on the entity class. This will add the <code>@EntityListener</code> annotation to the class. The associated listener class includes all the lifecycle callbacks for the entity. The listener is generated on the first run and will never be overwritten, so you are free to add your implementation to the lifecycle callback operations. </p> </subsection> <a name="Session_Bean_Callbacks"/> <subsection name="Session Bean Callbacks"> <p> You can define any number of the following callbacks in an session bean by modelling the appropriate stereotype on an operation. You can only define 1 lifecycle callback stereotype per session operation. The lifecycle callbacks for a stateless session bean is a subset of the lifecycle callbacks for a stateful session bean. </p> <p> The following lifecycle callback for <b>stateless</b> session beans and the corresponding stereotype you need to model are: <ul> <li> PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first created and after the dependency injection is completed. </li> <li> PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the pool or destroyed. </li> </ul> </p> <p> The following lifecycle callback for <b>stateful</b> session beans and the corresponding stereotype you need to model are: <ul> <li> PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first created and after the dependency injection is completed. </li> <li> PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the pool or destroyed. </li> <li> PostActivate - <![CDATA[[<<PostActivate>>]]> - Invoked when the bean has just been reactivated. </li> <li> PrePassivate - <![CDATA[<<PrePassivate>>]]> - Invoked just before the container passivates the bean instance. </li> </ul> </p> <p> To seperate out the callback for the session bean into an <b>interceptor</b> class, simply model the <![CDATA[<<Listener>>]]> stereotype on the session bean. This will add the <code>@Interceptors</code> annotation to the bean base class. The associated listener/interceptor class includes all the appropriate lifecycle callbacks for the session bean. The listener is generated on the first run and will never be overwritten, so you are free to add your implementation to the lifecycle callback operations. These lifecycle methods of the interceptors must call <code>proceed</code> on the <code>InvocationContext</code> as the last execution step to invoke the next interceptor in the chain. </p> </subsection> <a name="Message_Driven_Bean_Callbacks"/> <subsection name="Message-Driven Bean Callbacks"> <p> You can define any number of the following callbacks in a message-driven bean by modelling the appropriate stereotype on a MDB operation. You can only define 1 lifecycle callback stereotype per MDB operation. </p> <p> The following lifecycle callback for <b>stateless</b> session beans and the corresponding stereotype you need to model are: <ul> <li> PostConstruct - <![CDATA[<<PostConstruct>>]]> - Invoked when the bean is first created and after the dependency injection is completed. </li> <li> PreDestroy - <![CDATA[<<PreDestroy>>]]> - Invoked when the bean is removed from the pool or destroyed. </li> </ul> </p> <p> You can follow the same process as in <a href="howto14.html#Session_Bean_Callbacks">session bean</a> callbacks above to separate out the callback interceptor class for the message-driven bean. </p> </subsection> </section> <section name="Next"> <p> For a guide on how to utilise transactions in this cartridge, click <a href="howto14.html">here</a>. </p> </section> </body> </document> |
From: Vance K. <va...@us...> - 2006-03-03 04:05:57
|
User: vancek Date: 06/03/02 20:05:55 Modified: andromda-ejb3/src/site/xdoc howto.xml Log: added lifecycle callback list Revision Changes Path 1.5 +8 -0 cartridges/andromda-ejb3/src/site/xdoc/howto.xml Index: howto.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- howto.xml 25 Feb 2006 14:48:22 -0000 1.4 +++ howto.xml 3 Mar 2006 04:05:53 -0000 1.5 @@ -114,6 +114,14 @@ <li><a href="howto10.html#Helpful_Hints">Helpful Hints</a></li> </ul> </li> + <li> + <a href="howto14.html">Lifecycle Callbacks</a> + <ul> + <li><a href="howto14.html#Entity_Bean_Callbacks">Entity Bean Callbacks</a></li> + <li><a href="howto14.html#Session_Bean_Callbacks">Session Bean Callbacks</a></li> + <li><a href="howto14.html#Message_Driven_Bean_Callbacks">Message Driven Bean Callbacks</a></li> + </ul> + </li> </ul> </p> <p> |
From: Vance K. <va...@us...> - 2006-03-02 10:34:23
|
User: vancek Date: 06/03/02 02:34:21 Modified: andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added lifecycle callback method checks to EJB3SessionOperationFacade and created new EJB3MessageDrivenOperationFacade Revision Changes Path 1.21 +176 -161 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |