From: Vance K. <va...@us...> - 2006-05-29 01:45:36
|
User: vancek Date: 06/05/28 18:45:32 Modified: andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added method getForeignKeyConstraintName to EJB3AssociationEndFacade Revision Changes Path 1.38 +209 -210 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-06-14 05:05:45
|
User: vancek Date: 06/06/13 22:05:43 Modified: andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added initial support for JBoss Seam to entity and session bean components fixed JIRA EJB-27 getting view types in service delegates when mixing local and remote types Revision Changes Path 1.40 +213 -208 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-06-26 06:53:35
|
User: vancek Date: 06/06/25 23:53:33 Modified: andromda-ejb3/src/site/xdoc howto.xml howto16.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3ManageableEntityFacadeLogicImpl.java EJB3ManageableEntityAttributeFacadeLogicImpl.java EJB3ManageableEntityAssociationEndFacadeLogicImpl.java EJB3AssociationEndFacadeLogicImpl.java EJB3EntityAttributeFacadeLogicImpl.java andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Profile.java EJB3Globals.java andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: EJB3ManageableEntityAssociationEndFacade extends EJB3AssociationEndFacade and EJB3ManageableEntityAttributeFacade extends EJB3EntityAttributeFacade - refactor to remove method duplication fix isRequired in EJB3AssociationEndFacade and EJB3EntityAttributeFacade to exclude property if entity has a generalization to a mapped superclass add support for default list, set and map types for collection association ends added ability to set association end collection index name and type for map index set default collection interface for association ends java.util.SortedSet from java.util.Collection Revision Changes Path 1.20 +5 -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.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- howto.xml 29 May 2006 06:39:00 -0000 1.19 +++ howto.xml 26 Jun 2006 06:53:32 -0000 1.20 @@ -213,7 +213,11 @@ </p> </li> <li> - <p><a href="howto16.html">Manageable Entities</a></p> + <p> + <a href="howto16.html">Manageable Entities</a></p> + <ul> + <li><p><a href="howto16.html#Manageable_Entities_Tips">Tips</a></p></li> + </ul> </li> <li> <p> 1.5 +9 -0 cartridges/andromda-ejb3/src/site/xdoc/howto16.xml Index: howto16.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/xdoc/howto16.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- howto16.xml 29 May 2006 01:53:36 -0000 1.4 +++ howto16.xml 26 Jun 2006 06:53:32 -0000 1.5 @@ -99,6 +99,15 @@ <a href="http://galaxy.andromda.org/docs/andromda-cartridges/manageable-entities/index.html"> manageable entities</a> for AndroMDA. </p> + <a name="Manageable_Entities_Tips"/> + <subsection name="Tips"> + <p> + You should assign one attribute of every manageable entity as a unique index. This is + achieved by modelling the <![CDATA[<<Unique>>]]> stereotype on the attribute. As a result, it + will display the unique attribute value for foreign key reference columns when listing entities, + rather than the complete target entity property name-value pairs. + </p> + </subsection> </section> <section name="Next"> <p> 1.4 +7 -1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java Index: EJB3ManageableEntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- EJB3ManageableEntityFacadeLogicImpl.java 24 Apr 2006 02:55:36 -0000 1.3 +++ EJB3ManageableEntityFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.4 @@ -1,15 +1,22 @@ package org.andromda.cartridges.ejb3.metafacades; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import java.util.List; import org.andromda.cartridges.ejb3.EJB3Globals; import org.andromda.cartridges.ejb3.EJB3Profile; +import org.andromda.metafacades.uml.AssociationEndFacade; import org.andromda.metafacades.uml.AttributeFacade; +import org.andromda.metafacades.uml.ClassifierFacade; +import org.andromda.metafacades.uml.Entity; import org.andromda.metafacades.uml.EntityAttribute; import org.andromda.metafacades.uml.ManageableEntityAttribute; import org.andromda.metafacades.uml.UMLProfile; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.Predicate; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; @@ -278,5 +285,4 @@ return displayAttribute; } - } \ No newline at end of file 1.3 +4 -3 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityAttributeFacadeLogicImpl.java Index: EJB3ManageableEntityAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityAttributeFacadeLogicImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- EJB3ManageableEntityAttributeFacadeLogicImpl.java 17 Feb 2006 02:38:22 -0000 1.2 +++ EJB3ManageableEntityAttributeFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.3 @@ -24,11 +24,12 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAttributeFacadeLogic#handleGetTemporalType() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAttributeFacadeLogic#getTemporalType() */ - protected String handleGetTemporalType() + @Override + public String getTemporalType() { - String temporalType = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE); + String temporalType = super.getTemporalType(); if (StringUtils.isBlank(temporalType)) { temporalType = String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_TEMPORAL_TYPE)); 1.3 +5 -31 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityAssociationEndFacadeLogicImpl.java Index: EJB3ManageableEntityAssociationEndFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityAssociationEndFacadeLogicImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- EJB3ManageableEntityAssociationEndFacadeLogicImpl.java 20 Feb 2006 05:21:15 -0000 1.2 +++ EJB3ManageableEntityAssociationEndFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.3 @@ -3,7 +3,12 @@ import java.text.MessageFormat; import org.andromda.cartridges.ejb3.EJB3Globals; +import org.andromda.metafacades.uml.ClassifierFacade; +import org.andromda.metafacades.uml.TypeMappings; +import org.andromda.metafacades.uml.UMLMetafacadeProperties; import org.andromda.metafacades.uml.UMLMetafacadeUtils; +import org.andromda.metafacades.uml.UMLProfile; +import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; @@ -15,39 +20,8 @@ public class EJB3ManageableEntityAssociationEndFacadeLogicImpl extends EJB3ManageableEntityAssociationEndFacadeLogic { - public EJB3ManageableEntityAssociationEndFacadeLogicImpl (Object metaObject, String context) { super (metaObject, context); } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAssociationEndFacadeLogic#handleGetLabelName() - */ - protected String handleGetLabelName() - { - String labelNamePattern = (this.isMany() ? - (String)this.getConfiguredProperty(EJB3Globals.LABEL_COLLECTION_NAME_PATTERN) : - (String)this.getConfiguredProperty(EJB3Globals.LABEL_SINGLE_NAME_PATTERN)); - - return MessageFormat.format( - labelNamePattern, - new Object[] {StringUtils.trimToEmpty(this.getName())}); - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAssociationEndFacadeLogic#handleGetGetterLabelName() - */ - protected String handleGetGetterLabelName() - { - return UMLMetafacadeUtils.getGetterPrefix(this.getType()) + StringUtils.capitalize(this.getLabelName()); - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAssociationEndFacadeLogic#handleGetSetterLabelName() - */ - protected String handleGetSetterLabelName() - { - return "set" + StringUtils.capitalize(this.getLabelName()); - } } \ No newline at end of file 1.10 +184 -10 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java Index: EJB3AssociationEndFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- EJB3AssociationEndFacadeLogicImpl.java 29 May 2006 01:37:57 -0000 1.9 +++ EJB3AssociationEndFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.10 @@ -35,17 +35,17 @@ /** * The default composite association cascade property */ - public static final String ENTITY_DEFAULT_COMPOSITE_CASCADE = "entityCompositeCascade"; + private static final String ENTITY_DEFAULT_COMPOSITE_CASCADE = "entityCompositeCascade"; /** * The default aggregation association cascade property */ - public static final String ENTITY_DEFAULT_AGGREGATION_CASCADE = "entityAggergationCascade"; + private static final String ENTITY_DEFAULT_AGGREGATION_CASCADE = "entityAggergationCascade"; /** * The namespace property storing default collection type for associations */ - public static final String ASSOCIATION_COLLECTION_TYPE = "associationCollectionType"; + private static final String ASSOCIATION_COLLECTION_TYPE = "associationCollectionType"; /** * A flag indicating whether or not specific (java.util.Set, java.util.List, @@ -53,14 +53,24 @@ * accessors or whether the generic java.util.Collection interface should be * used. */ - public static final String SPECIFIC_COLLECTION_INTERFACES = "specificCollectionInterfaces"; + private static final String SPECIFIC_COLLECTION_INTERFACES = "specificCollectionInterfaces"; /** * The property that defines the default collection interface, this is the * interface used if the property defined by - * {@link #SPECIFIC_COLLECTION_INTERFACES} is true. + * {@link #SPECIFIC_COLLECTION_INTERFACES} is false. */ - public static final String DEFAULT_COLLECTION_INTERFACE = "defaultCollectionInterface"; + private static final String DEFAULT_COLLECTION_INTERFACE = "defaultCollectionInterface"; + + /** + * Stores the default collection index name. + */ + private static final String COLLECTION_INDEX_NAME = "associationEndCollectionIndexName"; + + /** + * Stores the default collection index type. + */ + private static final String COLLECTION_INDEX_TYPE = "associationEndCollectionIndexType"; /** * Represents the EJB3 <code>ALL</code> cascade option and fully qualified representation. @@ -160,6 +170,21 @@ */ private static final String HIBERNATE_ASSOCIATION_CACHE = "hibernateAssociationCache"; + /** + * The 'list' type implementation to use. + */ + private static final String LIST_TYPE_IMPLEMENTATION = "listTypeImplementation"; + + /** + * The 'set' type implementation to use. + */ + private static final String SET_TYPE_IMPLEMENTATION = "setTypeImplementation"; + + /** + * The 'map' type implementation to use. + */ + private static final String MAP_TYPE_IMPLEMENTATION = "mapTypeImplementation"; + // ---------------- constructor ------------------------------- public EJB3AssociationEndFacadeLogicImpl (Object metaObject, String context) @@ -173,6 +198,7 @@ /** * @see org.andromda.metafacades.uml.AssociationEndFacade#getGetterSetterTypeName() */ + @Override public String getGetterSetterTypeName() { String getterSetterTypeName = null; @@ -203,13 +229,12 @@ } else { - getterSetterTypeName = - ObjectUtils.toString(this.getConfiguredProperty(DEFAULT_COLLECTION_INTERFACE)); + getterSetterTypeName = this.getDefaultCollectionInterface(); } } else { - getterSetterTypeName = ObjectUtils.toString(this.getConfiguredProperty(DEFAULT_COLLECTION_INTERFACE)); + getterSetterTypeName = this.getDefaultCollectionInterface(); } } else @@ -256,7 +281,11 @@ { EJB3EntityFacade entity = (EJB3EntityFacade)type; - if (entity.isInheritanceSingleTable() && (entity.getGeneralization() != null)) + /** + * Excluse ONLY if single table inheritance exists + */ + if (entity.isRequiresGeneralizationMapping() && entity.isInheritanceSingleTable() + && !entity.isEmbeddableSuperclassGeneralizationExists()) { required = false; } @@ -553,6 +582,60 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionTypeImplementation() + */ + protected String handleGetCollectionTypeImplementation() + { + return this.getCollectionTypeImplementation(null); + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionTypeImplementation(java.lang.String) + */ + protected String handleGetCollectionTypeImplementation(String arg) + { + StringBuffer implementation = new StringBuffer(); + if (this.isMany()) + { + implementation.append("new "); + if (this.isSet()) + { + implementation.append(this.getConfiguredProperty(SET_TYPE_IMPLEMENTATION)); + } + else if (this.isMap()) + { + implementation.append(this.getConfiguredProperty(MAP_TYPE_IMPLEMENTATION)); + } + else if (this.isList() || this.isCollection()) + { + implementation.append(this.getConfiguredProperty(LIST_TYPE_IMPLEMENTATION)); + } + + // set this association end's type as a template parameter if required + if (Boolean.valueOf(String.valueOf(this.getConfiguredProperty(UMLMetafacadeProperties.ENABLE_TEMPLATING))) + .booleanValue()) + { + implementation.append("<"); + if (this.isMap()) + { + implementation.append(this.getCollectionIndexType()); + implementation.append(", "); + } + implementation.append(this.getType().getFullyQualifiedName()); + implementation.append(">"); + } + implementation.append("("); + if (StringUtils.isNotBlank(arg)) + { + implementation.append(arg); + } + implementation.append(")"); + } + + return implementation.toString(); + } + + /** * Gets the collection type defined on this association end. * * @return the specific collection type. @@ -564,6 +647,63 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionIndexType() + */ + protected String handleGetCollectionIndexType() + { + Object value = this.findTaggedValue(EJB3Profile.TAGGEDVALUE_ASSOCIATION_INDEX_TYPE); + if (value == null) + { + value = this.getConfiguredProperty(COLLECTION_INDEX_TYPE); + if (StringUtils.isBlank(ObjectUtils.toString(value))) + { + value = null; + } + } + + if (value != null) + { + if (value instanceof String) + { + value = this.getRootPackage().findModelElement((String)value); + } + if (value instanceof EJB3TypeFacade) + { + value = ((EJB3TypeFacade)value).getFullyQualifiedEJB3Type(); + } + } + return (value != null) ? ObjectUtils.toString(value) : null; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionIndexName() + */ + protected String handleGetCollectionIndexName() + { + Object value = this.findTaggedValue(EJB3Profile.TAGGEDVALUE_ASSOCIATION_INDEX); + if ((value == null) && this.isConfiguredProperty(COLLECTION_INDEX_NAME)) + { + value = this.getConfiguredProperty(COLLECTION_INDEX_NAME); + if (StringUtils.isBlank(ObjectUtils.toString(value))) + { + value = null; + } + } + + if (value != null) + { + return ObjectUtils.toString(value); + } + final String otherEntityName = ((EJB3EntityFacade)this.getOtherEnd().getType()).getEntityName(); + final Object separator = this.getConfiguredProperty(UMLMetafacadeProperties.SQL_NAME_SEPARATOR); + return EntityMetafacadeUtils.toSqlName( + otherEntityName, + separator) + separator + EntityMetafacadeUtils.toSqlName( + this.getName(), + separator) + separator + "IDX"; + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleIsMap() */ protected boolean handleIsMap() @@ -603,6 +743,19 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleIsCollection() + */ + protected boolean handleIsCollection() + { + boolean isCollection = this.getCollectionType().equalsIgnoreCase(COLLECTION_TYPE_COLLECTION); + if (!isCollection && StringUtils.isBlank(this.getSpecificCollectionType())) + { + isCollection = this.isOrdered(); + } + return isCollection; + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetLabelName() */ protected String handleGetLabelName() @@ -718,4 +871,25 @@ buffer.append(constraintSuffix); return buffer.toString(); } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetDefaultCollectionInterface() + */ + protected String handleGetDefaultCollectionInterface() + { + return ObjectUtils.toString(this.getConfiguredProperty(DEFAULT_COLLECTION_INTERFACE)); + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleIsDefaultCollectionInterfaceSortedSet() + */ + protected boolean handleIsDefaultCollectionInterfaceSortedSet() + { + boolean isDefaultSortedSet = false; + if (StringUtils.equals(this.getDefaultCollectionInterface(), EJB3Globals.COLLECTION_INTERFACE_SORTED_SET)) + { + isDefaultSortedSet = true; + } + return isDefaultSortedSet; + } } \ No newline at end of file 1.14 +11 -1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java Index: EJB3EntityAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -r1.13 -r1.14 --- EJB3EntityAttributeFacadeLogicImpl.java 24 Apr 2006 02:47:36 -0000 1.13 +++ EJB3EntityAttributeFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.14 @@ -52,6 +52,7 @@ /** * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName() */ + @Override public String getGetterName() { return "get" + StringUtils.capitalize(super.getName()); @@ -62,13 +63,19 @@ * * @see org.andromda.metafacades.uml.AttributeFacade#isRequired() */ + @Override public boolean isRequired() { boolean required = super.isRequired(); if (this.getOwner() instanceof EJB3EntityFacade) { EJB3EntityFacade entity = (EJB3EntityFacade)this.getOwner(); - if (entity.isInheritanceSingleTable() && entity.getGeneralization() != null) + + /** + * Excluse ONLY if single table inheritance exists + */ + if (entity.isRequiresGeneralizationMapping() && entity.isInheritanceSingleTable() + && !entity.isEmbeddableSuperclassGeneralizationExists()) { required = false; } @@ -81,6 +88,7 @@ * * @see org.andromda.metafacades.uml.AttributeFacade#getDefaultValue() */ + @Override public String getDefaultValue() { String defaultValue = super.getDefaultValue(); @@ -359,6 +367,7 @@ * * @see org.andromda.metafacades.uml.EntityAttribute#getColumnLength() */ + @Override public String getColumnLength() { String columnLength = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_COLUMN_LENGTH); @@ -375,6 +384,7 @@ * * @see org.andromda.metafacades.uml.EntityAttribute#getColumnName() */ + @Override public String getColumnName() { String columnName = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_COLUMN); 1.26 +10 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Profile.java Index: EJB3Profile.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Profile.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -r1.25 -r1.26 --- EJB3Profile.java 14 Jun 2006 04:56:57 -0000 1.25 +++ EJB3Profile.java 26 Jun 2006 06:53:32 -0000 1.26 @@ -512,6 +512,16 @@ public static final String TAGGEDVALUE_ASSOCIATION_COLLECTION_TYPE = profile.get("ASSOCIATION_COLLECTION_TYPE"); /** + * Defines the index column type for ejb3 indexed collections + */ + public static final String TAGGEDVALUE_ASSOCIATION_INDEX_TYPE = profile.get("ASSOCIATION_INDEX_TYPE"); + + /** + * Defines the index column for ejb3 indexed collections + */ + public static final String TAGGEDVALUE_ASSOCIATION_INDEX = profile.get("ASSOCIATION_INDEX"); + + /** * Defines whether to exclude the default interceptors for the session operation. */ public static final String TAGGEDVALUE_SERVICE_INTERCEPTOR_EXCLUDE_DEFAULT = 1.13 +5 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java Index: EJB3Globals.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- EJB3Globals.java 14 Jun 2006 04:56:57 -0000 1.12 +++ EJB3Globals.java 26 Jun 2006 06:53:32 -0000 1.13 @@ -256,4 +256,9 @@ * Seam component scope type CONVERSATION */ public static final String SEAM_COMPONENT_SCOPE_CONVERSATION = "CONVERSATION"; + + /** + * The property representing the default collection interface of java.util.SortedSet + */ + public static final String COLLECTION_INTERFACE_SORTED_SET = "java.util.SortedSet"; } 1.9 +61 -0 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- changes.xml 17 Jun 2006 12:02:21 -0000 1.8 +++ changes.xml 26 Jun 2006 06:53:33 -0000 1.9 @@ -108,6 +108,67 @@ <action dev="vancek" type="add"> Added FAQ support section menu to site. </action> + <action dev="vancek" type="fix"> + Remove references to attributes modelled with a @Version annotation (optimistic lock value for entity) in + manageable service components. Initial work removed attribute from getAttributes, but that caused problems + from the manageable web tier action methods create and update. To account for this, allow the attribute as + arguement to the methods, but do not call the set accessor. + </action> + <action dev="vancek" type="fix"> + Moved the @Version annotation to the entity attribute. It had no effect on the getter method. + Removed all annotations on the corresponding getter method. + </action> + <action dev="vancek" type="update"> + Render the @Table annotation on every entity to avoid application server detting the default table name + mapped to by this entity. Currently, the annotation is only rendered when there is an inheritence hierarchy + or a mapped superclass. + </action> + <action dev="vancek" type="update"> + Update the default Collection for one-to-many and many-to-many associations to the java.util.SortedSet (in + namespace.xml). + Moving away from bag collection as the default since it is unnecessary in the majority of cases. + As a result, the @org.hibernate.annotations.Sort annotation is also rendered with a NATURAL sort type. + The create and update methods of the manageable service implementation wraps the retrieved bag collection(List) + for the 'many' side of the association with an appropriate collection implementation (unless java.util.List + is specified as the default). + </action> + <action dev="vancek" type="fix"> + Ignore the argument on create and update methods of DAO implementation components where the corresponding + entity attribute is modelled as an optimistic lock value with the Version stereotype. This should be improved + to eliminate the attribute when retrieving the attribute collection. + </action> + <action dev="vancek" type="update"> + Each finder is overloaded in the DAO components. One finder method that doesn't supply a manual query + argument should use the NamedQuery defined on the corresponding entity. Currently, it generates the query. + </action> + <action dev="vancek" type="fix"> + Minor fixes to the EJBQL of the finder methods in the manageable service base for manageable entities. + </action> + <action dev="vancek" type="fix"> + In the findAll method of the manageable service base implementation, the query now includes 'left join fetch' + for all related 'many' association ends where the target entity does not define a display attribute (where + the attribute is modelled with the Unique stereotype). + </action> + <action dev="vancek" type="update"> + Updated the metafacade definitions of EJB3AssociationEndFacadeLogicImpl, EJB3AssociationEndFacadeLogicImpl + and EJB3MessageDrivenOperationFacadeLogicImpl in metafacade.xml. + </action> + <action dev="vancek" type="add"> + Added support for default list, set and map type implementations for collection association ends in + namespace.xml. Also added the ability + for association end collection index name and type (further map support) to be specified via tagged values + @andromda.persistence.collection.index and @andromda.persistence.collection.index.type. This introduced + a new facade called EJB3TypeFacade. + </action> + <action dev="vancek" type="fix"> + Fixed isRequired in EJB3AssociationEndFacade and EJB3EntityAttributeFacade to exclude property if + the entity has a generalization to an mapped superclass. + </action> + <action dev="vancek" type="update"> + EJB3ManageableEntityAssociationEndFacade now also extends EJB3AssociationEndFacade with precedence tagged value + set. EJB3ManageableEntityAttributeFacade also extends EJB3EntityAttributeFacade. This eliminates the + need for the existing overwritten methods in the manageable entity facades. + </action> </release> </body> </document> \ No newline at end of file 1.41 +203 -212 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-06-27 11:15:35
|
User: vancek Date: 06/06/27 04:15:32 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EmbeddedValueFacadeLogicImpl.java andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added getFullyQualifiedImplementationName to EJB3EmbeddedValueFacade for orm.xml deployment descriptor Revision Changes Path 1.2 +12 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EmbeddedValueFacadeLogicImpl.java Index: EJB3EmbeddedValueFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EmbeddedValueFacadeLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- EJB3EmbeddedValueFacadeLogicImpl.java 24 Apr 2006 02:46:11 -0000 1.1 +++ EJB3EmbeddedValueFacadeLogicImpl.java 27 Jun 2006 11:15:31 -0000 1.2 @@ -60,4 +60,16 @@ { return String.valueOf(this.getConfiguredProperty(EMBEDDED_VALUE_IMPLEMENTATION_NAME_PATTERN)); } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EmbeddedValueFacadeLogic# + * handleGetFullyQualifiedImplementationName() + */ + protected String handleGetFullyQualifiedImplementationName() + { + return EJB3MetafacadeUtils.getFullyQualifiedName( + this.getPackageName(), + this.getImplementationName(), + null); + } } \ No newline at end of file 1.42 +237 -203 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-07-01 10:13:03
|
User: vancek Date: 06/07/01 03:13:01 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3AssociationEndFacadeLogicImpl.java andromda-ejb3/src/main/resources/templates/ejb3 GlobalMacros.vm EntityCompositePK.vsl Entity.vsl EntityEmbeddable.vsl andromda-ejb3/src/main/resources/META-INF/andromda profile.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: fix JIRA EJB-36 entities and composite PK implement Comparable and implement compareTo @Sort only set if collection interface is SortedSet Revision Changes Path 1.12 +47 -22 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java Index: EJB3AssociationEndFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- EJB3AssociationEndFacadeLogicImpl.java 26 Jun 2006 14:40:34 -0000 1.11 +++ EJB3AssociationEndFacadeLogicImpl.java 1 Jul 2006 10:13:00 -0000 1.12 @@ -139,7 +139,7 @@ /** * Value for collections */ - private static final String COLLECTION_TYPE_COLLECTION = "collection"; + private static final String COLLECTION_TYPE_COLLECTION = "bag"; /** * Stores the valid collection types @@ -225,6 +225,10 @@ { getterSetterTypeName = mappings.getTo(UMLProfile.LIST_TYPE_NAME); } + else if (this.isCollection()) + { + getterSetterTypeName = mappings.getTo(UMLProfile.COLLECTION_TYPE_NAME); + } } else { @@ -581,7 +585,36 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionTypeImplementation() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic# + * handleGetCollectionTypeImplemenationClass() + */ + protected String handleGetCollectionTypeImplemenationClass() + { + String collectionTypeImplementationClass = null; + if (this.isMany()) + { + if (this.isSet()) + { + collectionTypeImplementationClass = String.valueOf( + this.getConfiguredProperty(SET_TYPE_IMPLEMENTATION)); + } + else if (this.isMap()) + { + collectionTypeImplementationClass = String.valueOf( + this.getConfiguredProperty(MAP_TYPE_IMPLEMENTATION)); + } + else if (this.isList() || this.isCollection()) + { + collectionTypeImplementationClass = String.valueOf( + this.getConfiguredProperty(LIST_TYPE_IMPLEMENTATION)); + } + } + return collectionTypeImplementationClass; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic# + * handleGetCollectionTypeImplementation() */ protected String handleGetCollectionTypeImplementation() { @@ -589,7 +622,8 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetCollectionTypeImplementation(java.lang.String) + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic# + * handleGetCollectionTypeImplementation(java.lang.String) */ protected String handleGetCollectionTypeImplementation(String arg) { @@ -597,18 +631,7 @@ if (this.isMany()) { implementation.append("new "); - if (this.isSet()) - { - implementation.append(this.getConfiguredProperty(SET_TYPE_IMPLEMENTATION)); - } - else if (this.isMap()) - { - implementation.append(this.getConfiguredProperty(MAP_TYPE_IMPLEMENTATION)); - } - else if (this.isList() || this.isCollection()) - { - implementation.append(this.getConfiguredProperty(LIST_TYPE_IMPLEMENTATION)); - } + implementation.append(this.getCollectionTypeImplemenationClass()); // set this association end's type as a template parameter if required if (Boolean.valueOf(String.valueOf(this.getConfiguredProperty(UMLMetafacadeProperties.ENABLE_TEMPLATING))) @@ -872,7 +895,8 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleGetDefaultCollectionInterface() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic# + * handleGetDefaultCollectionInterface() */ protected String handleGetDefaultCollectionInterface() { @@ -880,15 +904,16 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic#handleIsDefaultCollectionInterfaceSortedSet() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacadeLogic# + * handleIsCollectionInterfaceSortedSet() */ - protected boolean handleIsDefaultCollectionInterfaceSortedSet() + protected boolean handleIsCollectionInterfaceSortedSet() { - boolean isDefaultSortedSet = false; - if (StringUtils.equals(this.getDefaultCollectionInterface(), EJB3Globals.COLLECTION_INTERFACE_SORTED_SET)) + boolean isInterfaceSortedSet = false; + if (this.getGetterSetterTypeName().startsWith(EJB3Globals.COLLECTION_INTERFACE_SORTED_SET)) { - isDefaultSortedSet = true; + isInterfaceSortedSet = true; } - return isDefaultSortedSet; + return isInterfaceSortedSet; } } \ No newline at end of file 1.3 +57 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/GlobalMacros.vm Index: GlobalMacros.vm =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/GlobalMacros.vm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- GlobalMacros.vm 1 Jun 2006 14:40:46 -0000 1.2 +++ GlobalMacros.vm 1 Jul 2006 10:13:01 -0000 1.3 @@ -7,6 +7,12 @@ ## identifier, must call accessor on PK object. ## #macro (renderEqualsMethod $class $className $attributeSet) + /** + * Indicates if the argument is of the same type and all values are equal. + * + * @param object The target object to compare with + * @return boolean True if both objects a 'equal' + */ public boolean equals(Object object) { #**##if ($attributeSet.empty) @@ -53,6 +59,11 @@ ## identifier, must call accessor on PK object. ## #macro (renderHashCodeMethod $class $attributeSet) + /** + * Returns a hash code value for the object + * + * @return int The hash code value + */ public int hashCode() { #**##if ($attributeSet.empty) @@ -89,6 +100,11 @@ ## identifier, must call accessor on PK object. ## #macro (renderToStringMethod $class $className $attributeSet) + /** + * Returns a String representation of the object + * + * @return String Textual representation of the object displaying name/value pairs for all attributes + */ public String toString() { #**##if ($attributeSet.empty) @@ -103,7 +119,7 @@ #* *##foreach ($attribute in $attributeSet) #* *##set ($attrType = $attribute.type) sb.append("${sep}#if ($class.compositePrimaryKeyPresent && $attribute.identifier)pk.#end${attribute.name}: "); - sb.append(#if ($class.compositePrimaryKeyPresent && $attribute.identifier)this.getPk().#end${attribute.getterName}()); + sb.append(#if ($class.compositePrimaryKeyPresent && $attribute.identifier)this.getPk().#end${attribute.getterName}()#if ($attribute.containsEmbeddedObject).toString()#end); #* *##set( $sep = ", " ) #* *##end## foreach sb.append(")"); @@ -111,3 +127,43 @@ #**##end## $attributeSet.empty } #end +## +## This macro will render the compareTo(Object o) method +## This is required since each entity implements Comparable<T> +## +#macro (renderCompareToMethod $class $className $identifiers) + /** + * @see java.lang.Comparable#compareTo(T) + */ + public int compareTo($className o) + { + int cmp = 0; +#**##if ($identifiers.size() > 1) + if (this.getPk() != null) + { + cmp = this.getPk().compareTo(o.getPk()); + } +#**##else +#* *##set ($identifier = $identifiers.iterator().next()) + if (this.${identifier.getterName}() != null) + { + cmp = this.${identifier.getterName}().compareTo(o.${identifier.getterName}()); + } +#**##end +#**##set ($attributes = $class.attributes) +#**##if (!$attributes.empty) + else + { +#* *##foreach ($attribute in $attributes) +#* *##if (!$attribute.type.primitive && !$attribute.type.arrayType && !$attribute.lob && !$attribute.identifier && !$attribute.containsEmbeddedObject) + if (this.${attribute.getterName}() != null) + { + cmp = (cmp != 0 ? cmp : this.${attribute.getterName}().compareTo(o.${attribute.getterName}())); + } +#* *##end +#* *##end + } +#**##end + return cmp; + } +#end 1.2 +29 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityCompositePK.vsl Index: EntityCompositePK.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityCompositePK.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- EntityCompositePK.vsl 18 Jan 2006 08:46:04 -0000 1.1 +++ EntityCompositePK.vsl 1 Jul 2006 10:13:01 -0000 1.2 @@ -10,7 +10,8 @@ $entity.getDocumentation(" * ") */ @javax.persistence.Embeddable -public class ${entity.entityCompositePrimaryKeyName} implements java.io.Serializable +public class ${entity.entityCompositePrimaryKeyName} + implements java.io.Serializable, Comparable<${entity.entityCompositePrimaryKeyName}> { private static final long serialVersionUID = 1L; @@ -104,4 +105,31 @@ #**##end #end } + + /** + * @see java.lang.Comparable#compareTo(T) + */ + public int compareTo(${entity.entityCompositePrimaryKeyName} o) + { + int cmp = 0; +#set ($identifiers = $class.identifiers) +#if (!$identifiers.empty) +#**##foreach ($identifier in $identifiers) +#* *##if (!$identifier.type.primitive && !$identifier.type.arrayType && !$identifier.lob && !$identifier.containsEmbeddedObject) +#* *##if ($velocityCount == 1) + if (this.${identifier.getterName}() != null) + { + cmp = this.${identifier.getterName}().compareTo(o.${identifier.getterName}()); + } +#* *##else + if (this.${identifier.getterName}() != null) + { + cmp = (cmp != 0 ? cmp : this.${identifier.getterName}().compareTo(o.${identifier.getterName}())); + } +#* *##end +#* *##end +#**##end +#end + return cmp; + } } \ No newline at end of file 1.20 +2 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl Index: Entity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- Entity.vsl 14 Jun 2006 04:55:20 -0000 1.19 +++ Entity.vsl 1 Jul 2006 10:13:01 -0000 1.20 @@ -65,7 +65,7 @@ #end public#if ($entity.abstract) abstract#end class ${entity.entityName} extends ${entity.fullyQualifiedEntityEmbeddableName} - implements java.io.Serializable + implements java.io.Serializable, Comparable<${entity.entityName}> { /** @@ -198,4 +198,5 @@ #* *##end #**##end #end +#renderCompareToMethod($entity $entity.entityName $entity.identifiers) } \ No newline at end of file 1.37 +11 -19 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl Index: EntityEmbeddable.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl,v retrieving revision 1.36 retrieving revision 1.37 diff -u -w -r1.36 -r1.37 --- EntityEmbeddable.vsl 27 Jun 2006 05:20:29 -0000 1.36 +++ EntityEmbeddable.vsl 1 Jul 2006 10:13:01 -0000 1.37 @@ -121,10 +121,15 @@ extends ${entity.generalization.fullyQualifiedName} #**##end #end - implements java.io.Serializable +## +## Do not implement Comparable for (implicit or explicitly defined) mapped superclass +## or for a subclass in an inheritance hierarchy. +## + implements java.io.Serializable#if (!$entity.entityImplementationRequired && !$entity.embeddableSuperclass && !$entity.requiresGeneralizationMapping), Comparable<${entity.entityName}>#end## no newline #if (!$entity.interfaceAbstractions.empty) , $entity.implementedInterfaceList #end + { private static final long serialVersionUID = ${entity.serialVersionUID}L; @@ -598,7 +603,7 @@ #* *##if ($target.associationCacheEnabled) @org.hibernate.annotations.Cache(usage = org.hibernate.annotations.CacheConcurrencyStrategy.${target.cacheType}) #* *##end -#* *##if ($target.defaultCollectionInterfaceSortedSet) +#* *##if ($target.collectionInterfaceSortedSet) @org.hibernate.annotations.Sort(type = org.hibernate.annotations.SortType.NATURAL) #* *##end #* *##end @@ -716,7 +721,7 @@ #* *##if ($target.associationCacheEnabled) @org.hibernate.annotations.Cache(usage = org.hibernate.annotations.CacheConcurrencyStrategy.${target.cacheType}) #* *##end -#* *##if ($target.defaultCollectionInterfaceSortedSet) +#* *##if ($target.collectionInterfaceSortedSet) @org.hibernate.annotations.Sort(type = org.hibernate.annotations.SortType.NATURAL) #* *##end #* *##end @@ -784,26 +789,13 @@ #else #**##set ($entityName = $entity.entityName) #end - /** - * Indicates if the argument is of the same type and all values are equal. - * - * @param object The target object to compare with - * @return boolean True if both objects a 'equal' - */ #renderEqualsMethod($entity $entityName $entity.identifiers) - /** - * Returns a hash code value for the object - * - * @return int The hash code value - */ #renderHashCodeMethod($entity $entity.identifiers) - /** - * Returns a String representation of the object - * - * @return String Textual representation of the object displaying name/value pairs for all attributes - */ #renderToStringMethod($entity $entityName $entity.attributes) +#if (!$entity.entityImplementationRequired && !$entity.embeddableSuperclass && !$entity.requiresGeneralizationMapping) +#renderCompareToMethod($entity $entityName $entity.identifiers) +#end } \ No newline at end of file 1.32 +1 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/profile.xml Index: profile.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/profile.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -r1.31 -r1.32 --- profile.xml 26 Jun 2006 06:56:51 -0000 1.31 +++ profile.xml 1 Jul 2006 10:13:01 -0000 1.32 @@ -913,6 +913,7 @@ <value>set</value> <value>map</value> <value>list</value> + <value>bag</value> </allowedValues> </element> <element name="ASSOCIATION_INDEX"> 1.43 +220 -235 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-07-10 05:39:27
|
User: vancek Date: 06/07/09 22:39:27 Modified: andromda-ejb3/src/main/resources/META-INF/andromda namespace.xml cartridge.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3ManageableEntityFacadeLogicImpl.java andromda-ejb3/src/main/resources/templates/ejb3/crud ManageableServiceBase.vsl andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Globals.java andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added new namespace property manageableRolesAllowed to new property group new getManageableRolesAllowed in EJB3ManageableEntityFacade Revision Changes Path 1.26 +30 -9 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -r1.25 -r1.26 --- namespace.xml 26 Jun 2006 06:56:51 -0000 1.25 +++ namespace.xml 10 Jul 2006 05:39:26 -0000 1.26 @@ -936,6 +936,36 @@ </documentation> </property> </propertyGroup> + <propertyGroup name="Security Properties"> + <property name="securityRealm" required="false"> + <documentation> + Specifies the security domain to use + for role based authorization. Use the + security realm to match allowed roles. + This is only applicable for session beans + and MDBs. + </documentation> + </property> + <property name="manageableRolesAllowed"> + <default>Admin</default> + <documentation> + A comma separated list of roles added to the DAO + base <code>RolesAllowed</code> annotation. + This requires <code>securityRealm</code> be + enabled. + This exists because in some cases it is + incorrect to model an actor dependency on the + manageable entity and expect that actor to + define the authorised role on + ManageableServiceBeans. + This property separates + the roles for manageable session beans and + the remaining components. + It is expected that the list of roles + secure all manageable session beans. + </documentation> + </property> + </propertyGroup> <propertyGroup name="Other Properties"> <property name="persistenceContainerName"> <default>jboss</default> @@ -1033,15 +1063,6 @@ and aggregate associations define lazy loading. </documentation> </property> - <property name="securityRealm" required="false"> - <documentation> - Specifies the security domain to use - for role based authorization. Use the - security realm to match allowed roles. - This is only applicable for session beans - and MDBs. - </documentation> - </property> <property name="queryUseNamedParameters"> <default>true</default> <documentation> 1.28 +1 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -r1.27 -r1.28 --- cartridge.xml 27 Jun 2006 11:13:18 -0000 1.27 +++ cartridge.xml 10 Jul 2006 05:39:26 -0000 1.28 @@ -41,6 +41,7 @@ <property reference="enableTemplating"/> <property reference="jndiNamePrefix"/> <property reference="securityRealm"/> + <property reference="manageableRolesAllowed"/> <property reference="enableClustering"/> <property reference="webServiceContextRoot"/> <property reference="webServiceUrlPattern"/> 1.5 +28 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java Index: EJB3ManageableEntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- EJB3ManageableEntityFacadeLogicImpl.java 26 Jun 2006 06:53:32 -0000 1.4 +++ EJB3ManageableEntityFacadeLogicImpl.java 10 Jul 2006 05:39:26 -0000 1.5 @@ -14,6 +14,7 @@ import org.andromda.metafacades.uml.Entity; import org.andromda.metafacades.uml.EntityAttribute; import org.andromda.metafacades.uml.ManageableEntityAttribute; +import org.andromda.metafacades.uml.Role; import org.andromda.metafacades.uml.UMLProfile; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; @@ -285,4 +286,31 @@ return displayAttribute; } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#handleGetManageableRolesAllowed() + */ + protected String handleGetManageableRolesAllowed() + { + StringBuffer rolesAllowed = null; + String[] roles = StringUtils.split( + StringUtils.trimToEmpty( + ObjectUtils.toString(this.getConfiguredProperty(EJB3Globals.MANAGEABLE_ROLES_ALLOWED))), + ','); + String separator = ""; + + for (int i = 0; i < roles.length; i++) + { + if (rolesAllowed == null) + { + rolesAllowed = new StringBuffer(); + } + rolesAllowed.append(separator); + rolesAllowed.append('"'); + rolesAllowed.append(roles[i]); + rolesAllowed.append('"'); + separator = ", "; + } + return rolesAllowed != null ? rolesAllowed.toString() : null; + } } \ No newline at end of file 1.6 +6 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceBase.vsl Index: ManageableServiceBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceBase.vsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- ManageableServiceBase.vsl 26 Jun 2006 06:45:12 -0000 1.5 +++ ManageableServiceBase.vsl 10 Jul 2006 05:39:26 -0000 1.6 @@ -25,6 +25,11 @@ */ @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED) @javax.ejb.Remote({${manageable.fullyQualifiedManageableServiceName}.class}) +#if ($manageable.securityEnabled) +#**##if ($stringUtils.isNotBlank(${manageable.manageableRolesAllowed})) +...@ja...lesAllowed({${manageable.manageableRolesAllowed}}) +#**##end +#end public final class $manageable.manageableServiceBaseName implements $manageable.manageableServiceName { @@ -405,7 +410,7 @@ #* *##else query.setParameter("$identifier.name", $identifier.name); #* *##end - return query.getSingleResult(); + return ($member.type.fullyQualifiedName)query.getSingleResult(); } catch (Exception ex) { 1.19 +10 -0 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -r1.18 -r1.19 --- changes.xml 10 Jul 2006 05:29:37 -0000 1.18 +++ changes.xml 10 Jul 2006 05:39:26 -0000 1.19 @@ -223,6 +223,16 @@ This resulted in getTemporalType being refactored in EJB3EntityAttributeFacade and the overriding instance in EJB3ManageableEntityAttributeFacade to be removed. </action> + <action dev="vancek" type="fix"> + The getter (for BLOB type manageable attributes) in the manageable service base implementation must cast + the single result to appropriate type before returning. + </action> + <action dev="vancek" type="add"> + Add @RolesAllowed annotation with permitted roles authorised to access the manageable service. This was + achieved by introducing a new namespace property called <b>manageableRolesAllowed</b> rather than defined + by actors with dependencies on the manageable entity. A corresponding getManageableRolesAllowed + is available through EJB3ManageableEntityFacade to retrieve the formatted comma separated list of roles. + </action> </release> </body> </document> \ No newline at end of file 1.14 +30 -24 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java Index: EJB3Globals.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -r1.13 -r1.14 --- EJB3Globals.java 26 Jun 2006 06:53:32 -0000 1.13 +++ EJB3Globals.java 10 Jul 2006 05:39:26 -0000 1.14 @@ -30,6 +30,35 @@ */ public static final String LABEL_SINGLE_NAME_PATTERN = "labelSingleNamePattern"; + /** + * The pattern used to construct the DAO name. + */ + public static final String DAO_PATTERN = "daoNamePattern"; + + /** + * The property which stores the persistence context unit name associated with the default + * Entity Manager. + */ + public static final String PERSISTENCE_CONTEXT_UNIT_NAME = "persistenceContextUnitName"; + + /** + * The property used to specify the implementation operation name pattern + * on service and entity beans. + */ + public static final String IMPLEMENTATION_OPERATION_NAME_PATTERN = + "implementationOperationNamePattern"; + + /** + * The property used to specify whether to enable query cache. + */ + public static final String HIBERNATE_USER_QUERY_CACHE = "hibernateUseQueryCache"; + + /** + * The property that stores the comma separated list of roles for manageable + * service beans. + */ + public static final String MANAGEABLE_ROLES_ALLOWED = "manageableRolesAllowed"; + // --------------- Constants --------------------- /** @@ -225,29 +254,6 @@ public static final String TRANSFORMATION_TO_COLLECTION_METHOD_SUFFIX = "Collection"; /** - * The pattern used to construct the DAO name. - */ - public static final String DAO_PATTERN = "daoNamePattern"; - - /** - * The property which stores the persistence context unit name associated with the default - * Entity Manager. - */ - public static final String PERSISTENCE_CONTEXT_UNIT_NAME = "persistenceContextUnitName"; - - /** - * The property used to specify the implementation operation name pattern - * on service and entity beans. - */ - public static final String IMPLEMENTATION_OPERATION_NAME_PATTERN = - "implementationOperationNamePattern"; - - /** - * The property used to specify whether to enable query cache. - */ - public static final String HIBERNATE_USER_QUERY_CACHE = "hibernateUseQueryCache"; - - /** * Seam component scope type STATELESS */ public static final String SEAM_COMPONENT_SCOPE_STATELESS = "STATELESS"; 1.44 +228 -222 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-10-06 02:06:32
|
User: vancek Date: 06/10/05 19:06:31 Modified: andromda-ejb3/src/site/axdoc howto.xml howto5.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EnumerationFacadeLogicImpl.java andromda-ejb3/src/main/resources/templates/ejb3 Enumeration.vsl andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: Added support for enum member variables Add EJB3EnumerationFacade.memberVariablesAsList operation Update Enumeration.vsl to support member variables and data on literals Updated docs Revision Changes Path 1.2 +2 -0 cartridges/andromda-ejb3/src/site/axdoc/howto.xml Index: howto.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto.xml 14 Sep 2006 14:31:28 -0000 1.1 +++ howto.xml 6 Oct 2006 02:06:31 -0000 1.2 @@ -100,6 +100,8 @@ <ul> <li><a href="howto5.html#Literals">Literal</a></li> <li><a href="howto5.html#Enumeration_Types">Enumeration Types</a></li> + <li><a href="howto5.html#Add_Data">Adding Data to Enumerations</a></li> + <li><a href="howto5.html#Further_Reading">Further Reading</a></li> </ul> </li> <li> 1.2 +30 -0 cartridges/andromda-ejb3/src/site/axdoc/howto5.xml Index: howto5.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto5.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto5.xml 14 Sep 2006 14:31:27 -0000 1.1 +++ howto5.xml 6 Oct 2006 02:06:31 -0000 1.2 @@ -106,6 +106,36 @@ values of the enumeration literals are used. </p> </subsection> + <a name="Add_Data"/> + <subsection name="Adding Data to Enumerations"> + <p> + You can now add data to eumeration literals. This is achieved by adding member variables to + the enumeration class. + </p> + <p> + You simply model the enumeration as you would normally, but add a member variable as an + attribute of the class. You have to model the + <code>@andromda.persistence.enumeration.member.variable</code> tagged value on this attribute to + indicate that this is NOT a literal. + </p> + <p> + Once you have all your literals and member variables, you can model the + <code>@andromda.persistence.enumeration.literal.parameters</code> tagged value on + enumeration literal attributes. This tagged value takes a comma separated list containing + the data/values assigned to your member variables. + </p> + <p class="highlight"> + Remember to order this comma separated list according to the order you added the member variables. + This is used in the enum class constructor to initialise the member variables. + </p> + </subsection> + <a name="Further_Reading"/> + <subsection name="Further Reading"> + <p> + To get a better understanding of Java5 enumerations, have a look at + <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html">Java5 Enums</a>. + </p> + </subsection> </section> <section name="Next"> <p> 1.2 +39 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EnumerationFacadeLogicImpl.java Index: EJB3EnumerationFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EnumerationFacadeLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- EJB3EnumerationFacadeLogicImpl.java 25 Jan 2006 03:01:00 -0000 1.1 +++ EJB3EnumerationFacadeLogicImpl.java 6 Oct 2006 02:06:31 -0000 1.2 @@ -1,5 +1,9 @@ package org.andromda.cartridges.ejb3.metafacades; +import java.util.Collection; +import java.util.Iterator; + +import org.andromda.metafacades.uml.AttributeFacade; /** * MetafacadeLogic implementation for org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacade. @@ -14,4 +18,39 @@ { super (metaObject, context); } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacadeLogic# + * handleGetMemberVariablesAsList(java.util.Collection, boolean, boolean) + */ + protected String handleGetMemberVariablesAsList( + final Collection variables, + final boolean includeTypes, + final boolean includeNames) + { + if (!includeNames && !includeTypes || variables == null) + { + return ""; + } + + StringBuffer sb = new StringBuffer(); + String separator = ""; + + for (final Iterator it = variables.iterator(); it.hasNext();) + { + final AttributeFacade attr = (AttributeFacade)it.next(); + sb.append(separator); + separator = ", "; + if (includeTypes) + { + sb.append(attr.getType().getFullyQualifiedName()); + sb.append(" "); + } + if (includeNames) + { + sb.append(attr.getName()); + } + } + return sb.toString(); + } } \ No newline at end of file 1.5 +37 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Enumeration.vsl Index: Enumeration.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Enumeration.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- Enumeration.vsl 14 Jun 2006 14:37:25 -0000 1.4 +++ Enumeration.vsl 6 Oct 2006 02:06:31 -0000 1.5 @@ -16,10 +16,46 @@ /** $literal.getDocumentation(" * ") */ - ${literal.name}#if ($velocityCount != $enum.literals.size()),#else#**#;#end + ${literal.name}#if ($literal.enumerationLiteralParametersExist)(${literal.enumerationLiteralParameters})#end#if ($velocityCount != $enum.literals.size()),#else#**#;#end #end +#foreach ($memberVariable in $enum.memberVariables) + /** +$memberVariable.getDocumentation(" * ") + */ + $memberVariable.visibility $memberVariable.type.fullyQualifiedName ${memberVariable.name}; + +#end + /** + * $enum.name constructor + */ + private ${enum.name}($enum.getMemberVariablesAsList($enum.memberVariables, true, true)) + { +#foreach ($memberVariable in $enum.memberVariables) + ${memberVariable.setterName}(${memberVariable.name}); +#end + } + +#foreach ($memberVariable in $enum.memberVariables) + /** + * Get the $memberVariable.name property + * @return ${memberVariable.type.fullyQualifiedName} + */ + public ${memberVariable.type.fullyQualifiedName} ${memberVariable.getterName}() + { + return $memberVariable.name; + } + + /** + * Set the $memberVariable.name property. + * @param value the new value + */ + public void ${memberVariable.setterName}(${memberVariable.type.fullyQualifiedName} value) + { + this.${memberVariable.name} = value; + } +#end /** * Return the ${enum.name} from a string value * @return ${enum.name} enum object 1.33 +3 -0 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -u -w -r1.32 -r1.33 --- changes.xml 29 Sep 2006 08:01:27 -0000 1.32 +++ changes.xml 6 Oct 2006 02:06:31 -0000 1.33 @@ -297,6 +297,9 @@ EJB3MessageDrivenFacade.getDestinationType requires search and replace for destination type retrieved from TV. i.e. replace all '_' with '.'. </section> + <section dev="vancek" type="add"> + Add support for member variables within type safe enumerations. + </section> </release> </body> </document> \ No newline at end of file 1.45 +239 -229 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-10-08 13:52:40
|
User: vancek Date: 06/10/08 06:52:34 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3AssociationEndFacadeLogicImpl.java EJB3EntityFacadeLogicImpl.java andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: fix EJB3EntityFacade.identifier naming Revision Changes Path 1.16 +1 -1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java Index: EJB3AssociationEndFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -r1.15 -r1.16 --- EJB3AssociationEndFacadeLogicImpl.java 24 Aug 2006 08:54:31 -0000 1.15 +++ EJB3AssociationEndFacadeLogicImpl.java 8 Oct 2006 13:52:34 -0000 1.16 @@ -716,7 +716,7 @@ if(name == null) { // Find the identifier - EJB3EntityAttributeFacade identifier = ((EJB3EntityFacade)this.getOtherEnd().getType()).getIdentifer(); + EJB3EntityAttributeFacade identifier = ((EJB3EntityFacade)this.getOtherEnd().getType()).getIdentifier(); value = identifier.getType().getFullyQualifiedName(); return value.toString(); } 1.26 +2 -2 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java Index: EJB3EntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -r1.25 -r1.26 --- EJB3EntityFacadeLogicImpl.java 11 Aug 2006 05:49:46 -0000 1.25 +++ EJB3EntityFacadeLogicImpl.java 8 Oct 2006 13:52:34 -0000 1.26 @@ -1094,9 +1094,9 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleGetIdentifer() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleGetIdentifier() */ - protected Object handleGetIdentifer() + protected Object handleGetIdentifier() { return (EJB3EntityAttributeFacade)this.getIdentifiers().iterator().next(); } 1.36 +4 -1 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -w -r1.35 -r1.36 --- changes.xml 6 Oct 2006 16:11:20 -0000 1.35 +++ changes.xml 8 Oct 2006 13:52:34 -0000 1.36 @@ -298,11 +298,14 @@ from TV. i.e. replace all '_' with '.'. </action> <action dev="vancek" type="add"> - Add support for member variables within type safe enumerations. + UMLMETA-78 - Add support for member variables within type safe enumerations. </action> <action dev="vancek" type="add"> Demo EJB3 added to andromda-plugins/samples accompanied by quick site docs. </action> + <action dev="vancek" type="fix"> + Fix getIdentifier naming in EJB3EntityFacade. + </action> </release> </body> </document> \ No newline at end of file 1.46 +231 -238 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-10-08 15:24:00
|
User: vancek Date: 06/10/08 08:23:57 Modified: andromda-ejb3/src/main/resources/templates/ejb3/crud ManageableServiceRemote.vsl ManageableServiceBase.vsl andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3ManageableEntityFacadeLogicImpl.java andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: removed workaround in EJB3ManageableEntityFacade due to invalid naming of getIdentifier Revision Changes Path 1.4 +3 -7 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceRemote.vsl Index: ManageableServiceRemote.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceRemote.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- ManageableServiceRemote.vsl 26 Jun 2006 06:45:12 -0000 1.3 +++ ManageableServiceRemote.vsl 8 Oct 2006 15:23:57 -0000 1.4 @@ -6,16 +6,12 @@ #set ($generatedFile = "${manageable.manageableServiceFullPath}.java") #set ($memberList = $manageable.listManageableMembers(true)) #if (!$manageable.identifiers.empty) -#**##set ($identifier = $manageable.manageableIdentifierWorkaround) +#**##set ($identifier = $manageable.manageableIdentifier) #end package $manageable.manageablePackageName; /** * Manageable service bean remote interface - * - * NOTE: This is currently using the workaround to get the manageable entity identifer - * Once the metafacade engine is fixed, search for all calls with suffix "Workaround" - * and remove this suffix. */ public interface $manageable.manageableServiceName { @@ -44,12 +40,12 @@ #**##end #end -#if ($manageable.updateWorkaround) +#if ($manageable.update) public $manageable.fullyQualifiedName update($memberList) throws ${manageable.fullyQualifiedManageableServiceUpdateExceptionName}; #end -#if ($manageable.deleteWorkaround) +#if ($manageable.delete) public void delete(${identifier.type.fullyQualifiedName}[] ids) throws ${manageable.fullyQualifiedManageableServiceDeleteExceptionName}; 1.7 +12 -16 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceBase.vsl Index: ManageableServiceBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/crud/ManageableServiceBase.vsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- ManageableServiceBase.vsl 10 Jul 2006 05:39:26 -0000 1.6 +++ ManageableServiceBase.vsl 8 Oct 2006 15:23:57 -0000 1.7 @@ -7,16 +7,12 @@ #set ($memberList = $manageable.listManageableMembers(true)) #set ($memberListArguments = $manageable.listManageableMembers(false)) #if (!$manageable.identifiers.empty) -#**##set ($identifier = $manageable.manageableIdentifierWorkaround) +#**##set ($identifier = $manageable.manageableIdentifier) #end package $manageable.manageablePackageName; /** * Autogenerated EJB manageable session bean class ${manageable.manageableServiceName}. - * - * NOTE: This is currently using the workaround to get the manageable entity identifer - * Once the metafacade engine is fixed, search for all calls with suffix "Workaround" - * and remove this suffix. */ /** * Do not specify the javax.ejb.${manageable.type} annotation @@ -53,13 +49,13 @@ // ------------ Private Operations ---------- #**##foreach ($associatedClass in $associatedClasses) - private java.util.List<${associatedClass.fullyQualifiedEntityName}> find${associatedClass.name}ByIds(${associatedClass.manageableIdentifierWorkaround.type.fullyQualifiedName}[] ids) + private java.util.List<${associatedClass.fullyQualifiedEntityName}> find${associatedClass.name}ByIds(${associatedClass.identifier.type.fullyQualifiedName}[] ids) throws ${manageable.fullyQualifiedManageableServiceReadExceptionName} { try { - javax.persistence.Query query = emanager.createQuery("select entity from ${associatedClass.entityName} as entity where entity.${associatedClass.manageableIdentifierWorkaround.name} in (:${associatedClass.manageableIdentifierWorkaround.name})"); - query.setParameter("${associatedClass.manageableIdentifierWorkaround.name}", java.util.Arrays.asList(ids)); + javax.persistence.Query query = emanager.createQuery("select entity from ${associatedClass.entityName} as entity where entity.${associatedClass.identifier.name} in (:${associatedClass.identifier.name})"); + query.setParameter("${associatedClass.identifier.name}", java.util.Arrays.asList(ids)); return query.getResultList(); } catch (Exception ex) @@ -335,7 +331,7 @@ ## add left join fetch to query to retrieve many side of association ends ## this is only required if the ends are not initialised further down ## -#**##if ($member.type.displayAttributeWorkaround.name == $member.type.manageableIdentifierWorkaround.name) +#**##if ($member.type.manageableDisplayAttribute.name == $member.type.identifier.name) #* *##if ($member.many) #* *##set ($findAllQuery = "${findAllQuery} left join fetch entity.${member.name}") #* *##end @@ -347,7 +343,7 @@ #end java.util.List<${manageable.fullyQualifiedEntityName}> entities = query.getResultList(); #foreach ($member in $manageable.manageableAssociationEnds) -#**##if ($member.type.displayAttributeWorkaround.name != $member.type.manageableIdentifierWorkaround.name) +#**##if ($member.type.manageableDisplayAttribute.name != $member.type.identifier.name) org.apache.commons.collections.CollectionUtils.transform(entities, new org.apache.commons.collections.Transformer() { public Object transform(final Object object) @@ -356,18 +352,18 @@ if (result.${member.getterName}() != null) { #* *##if ($member.many) - java.util.Collection<${member.type.displayAttributeWorkaround.type.fullyQualifiedName}> $member.labelName = java.util.Collections.synchronizedCollection(new java.util.ArrayList<${member.type.displayAttributeWorkaround.type.fullyQualifiedName}>()); + java.util.Collection<${member.type.manageableDisplayAttribute.type.fullyQualifiedName}> $member.labelName = java.util.Collections.synchronizedCollection(new java.util.ArrayList<${member.type.manageableDisplayAttribute.type.fullyQualifiedName}>()); for (final java.util.Iterator<${member.type.fullyQualifiedEntityName}> iterator = result.${member.getterName}().iterator(); iterator.hasNext();) { ${member.type.fullyQualifiedEntityName} entity = iterator.next(); synchronized (${member.labelName}) { - ${member.labelName}.add(entity.${member.type.displayAttributeWorkaround.getterName}()); + ${member.labelName}.add(entity.${member.type.manageableDisplayAttribute.getterName}()); } } result.${member.setterLabelName}(${member.labelName}); #* *##else - result.${member.setterName}#if ($member.many)Labels#else#**#Label#end(result.${member.getterName}().${member.type.displayAttributeWorkaround.getterName}()); + result.${member.setterName}#if ($member.many)Labels#else#**#Label#end(result.${member.getterName}().${member.type.manageableDisplayAttribute.getterName}()); #* *##end } return result; @@ -435,7 +431,7 @@ try { #* *##foreach ($member in $manageable.manageableAssociationEnds) - lists.put("${member.name}", emanager.createQuery("select item.${member.type.manageableIdentifierWorkaround.name}, item.${member.type.displayAttributeWorkaround.name} from ${member.type.entityName} as item order by item.${member.type.displayAttributeWorkaround.name}").getResultList()); + lists.put("${member.name}", emanager.createQuery("select item.${member.type.identifier.name}, item.${member.type.manageableDisplayAttribute.name} from ${member.type.entityName} as item order by item.${member.type.manageableDisplayAttribute.name}").getResultList()); #* *##end } catch (Exception ex) @@ -447,7 +443,7 @@ #**##end #end -#if ($manageable.updateWorkaround) +#if ($manageable.update) /** * Update Operation * @@ -533,7 +529,7 @@ } #end -#if ($manageable.deleteWorkaround) +#if ($manageable.delete) /** * Delete operation * 1.7 +0 -63 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java Index: EJB3ManageableEntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3ManageableEntityFacadeLogicImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- EJB3ManageableEntityFacadeLogicImpl.java 11 Aug 2006 05:49:46 -0000 1.6 +++ EJB3ManageableEntityFacadeLogicImpl.java 8 Oct 2006 15:23:57 -0000 1.7 @@ -215,69 +215,6 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#isDeleteWorkaround() - */ - protected boolean handleIsDeleteWorkaround() - { - return (this.getIdentifiers(true).iterator().next() != null ? true : false); - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#isUpdateWorkaround() - */ - protected boolean handleIsUpdateWorkaround() - { - return (this.getIdentifiers(true).iterator().next() != null ? true : false); - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#getManageableIdentifierWorkaround() - */ - protected EntityAttribute handleGetManageableIdentifierWorkaround() - { - return (EntityAttribute)this.getIdentifiers(true).iterator().next(); - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#handleGetDisplayAttributeWorkaround() - */ - protected AttributeFacade handleGetDisplayAttributeWorkaround() - { - AttributeFacade displayAttribute = null; - - final Object taggedValueObject = findTaggedValue(UMLProfile.TAGGEDVALUE_MANAGEABLE_DISPLAY_NAME); - if (taggedValueObject != null) - { - displayAttribute = findAttribute(StringUtils.trimToEmpty(taggedValueObject.toString())); - } - - final Collection attributes = getAttributes(true); - for (final Iterator attributeIterator = attributes.iterator(); - attributeIterator.hasNext() && displayAttribute == null;) - { - final EntityAttribute attribute = (EntityAttribute)attributeIterator.next(); - if (attribute.isUnique()) - { - displayAttribute = attribute; - } - } - - if (displayAttribute == null) - { - if (!getIdentifiers().isEmpty()) - { - displayAttribute = (EntityAttribute)getIdentifiers().iterator().next(); - } - else if (!attributes.isEmpty()) - { - displayAttribute = (EntityAttribute)attributes.iterator().next(); - } - } - - return displayAttribute; - } - - /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityFacadeLogic#handleGetManageableRolesAllowed() */ protected String handleGetManageableRolesAllowed() 1.37 +2 -1 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.36 retrieving revision 1.37 diff -u -w -r1.36 -r1.37 --- changes.xml 8 Oct 2006 13:52:34 -0000 1.36 +++ changes.xml 8 Oct 2006 15:23:57 -0000 1.37 @@ -304,7 +304,8 @@ Demo EJB3 added to andromda-plugins/samples accompanied by quick site docs. </action> <action dev="vancek" type="fix"> - Fix getIdentifier naming in EJB3EntityFacade. + Fix getIdentifier naming in EJB3EntityFacade which eliminates the workaround solution in + EJB3ManageableEntityFacade. </action> </release> </body> 1.47 +214 -221 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-12-18 02:02:36
|
User: vancek Date: 06/12/17 18:02:35 Modified: andromda-ejb3/src/test/uml EJB3CartridgeTestModel.xml.zip andromda-ejb3/src/site site.xml andromda-ejb3 pom.xml andromda-ejb3/src/site/axdoc howto21.xml howto5.xml howto9.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Added: andromda-ejb3/src/site changes.xml Log: update deps to version 3.3-SNAPSHOT Revision Changes Path 1.2 +221 -79 cartridges/andromda-ejb3/src/test/uml/EJB3CartridgeTestModel.xml.zip <<Binary file>> 1.20 +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.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- site.xml 6 Oct 2006 06:49:58 -0000 1.19 +++ site.xml 18 Dec 2006 02:02:34 -0000 1.20 @@ -3,7 +3,7 @@ <skin> <groupId>org.andromda.maven.site</groupId> <artifactId>andromda-site-skin</artifactId> - <version>3.2-SNAPSHOT</version> + <version>3.3-SNAPSHOT</version> </skin> <bannerLeft> <name></name> 1.1 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== <document> <properties> <title>EJB3 Cartridge Plugin Project</title> <author email="va...@an...">Vance Karimi</author> </properties> <body> <release version="1.0-SNAPSHOT" date="2006-06-01" desc="Changes for 1.0-SNAPSHOT"> <action dev="vancek" type="add"> Introduced changes.xml and report. </action> <action dev="vancek" type="add"> Added manageable entity support. </action> <action dev="vancek" type="add"> Added JBoss cache support. </action> <action dev="vancek" type="update"> Set default discriminator value consisting of first character of entity name if one isn't explicitly specified. </action> <action dev="vancek" type="add"> Added DAO support for every entity POJO. </action> <action dev="vancek" type="update"> Refactored javax.ejb package for interceptor related annotations to javax.annotation. NOTE: These annotations are NOT used anyway since interceptor components are configured via XML descriptor. </action> <action dev="vancek" type="update"> Added Maven reporting facilities to site generation. Using new AndroMDA site skin for site generation. To run these reports, the following Maven report plugins need to be installed. Some may only exist on the Maven sandox. maven-site-plugin, maven-project-info-reports-plugin, maven-javadoc-plugin, maven-surefire-report-plugin, maven-jxr-plugin, maven-pmd-plugin, maven-checkstyle-plugin, maven-changes-plugin and maven-changelog-plugin. The maven-changelog-plugin will require you to have cvs.exe (if on windows platform) in your path. </action> <action dev="vancek" type="fix"> Many-to-Many association owning side JoinTable - JoinColumn name property fixed. JIRA EJB-25 </action> <action dev="vancek" type="fix"> NamedQuery definition to pick up firstResult and maxResult arguments modelled with these stereotypes and NOT include then in where clause. </action> <action dev="vancek" type="add"> Added installation howto. </action> <action dev="vancek" due-to="tlu" type="add"> Added equals, hashCode and toString methods to entities. </action> <action dev="vancek" type="update"> Updates to bring up to date with EJB 3.0 FR. Now require JBoss 4.0.4-GA with EJB 3.0 RC8-PFD update. Update include @javax.annotation.EJB --> @javax.ejb.EJB Interceptor related classes and annotations moved to javax.interceptor package. </action> <action dev="vancek" type="fix"> MDB base class must implement javax.jms.MessageListener to avoid the following error message on deployment: java.lang.RuntimeException: unable to determine messagingType interface for MDB </action> <action dev="vancek" type="remove"> Removed container configuration option via tagged value on message driven beans since it is no longer supported. </action> <action dev="vancek" type="add"> Added minimumPoolSize (@andromda.ejb.mdb.pool.size.min) and maximumPoolSize (@andromda.ejb.mdb.pool.size.min) tagged value options for message driven beans i.e. to allow singleton message driven beans. These are added as activation config properties to the ejb-jar.xml. Added documentation. </action> <action dev="vancek" type="update"> Updated the EJB3MetafacadeModel.xml to use the maven2.repository environment variable rather than hard coded paths for profiles. </action> <action dev="vancek" type="update"> If session bean is a Seam component, then don't set the bean type to stateful if the bean contains an attribute. For session bean Seam components, the only way to specify it as a SFSB is via tagged value on the class. </action> <action dev="vancek" type="fix"> Don't restrict rendering of accessor methods for session bean attributes that only have 'public' visibility. Accessors generated for all attributes for all visilities. </action> <action dev="vancek" type="add"> Introduce JBoss Seam components corresponding with Seam 1.0.0-CR3. Always generate a local interface for a session bean if it is a Seam component. </action> <action dev="vancek" due-to="tlu" type="fix"> JIRA EJB-27 - If a session bean operation is modelled for the local view type interface, a local interface is NOT generated. When returning a view type from the EJB3SessionFacade, must lookup all business operations to determine their view type individually and return a view type for the session bean to accomodate local, remote and both. Refactor service delegate templates and introduce a parent base class which all service delegates extend. Fix problem with exposing only remote operations as webservice endpoints. </action> <action dev="vancek" due-to="tlu" type="add"> JIRA EJB-28 - Added support for adding ejb-jar elements to the persistence.xml. </action> <action dev="vancek" due-to="tlu" type="update"> Generate documentation for enumeration literals. </action> <action dev="vancek" type="fix"> Inheritance hierarchies where the super class is a mapped superclass, the subclass should not render the DiscriminatorValue annotation. This annotation should only be rendered in subclasses of single table inheritance hierarchies. </action> <action dev="vancek" type="add"> Added FAQ support section menu to site. </action> <action dev="vancek" type="fix"> Remove references to attributes modelled with a @Version annotation (optimistic lock value for entity) in manageable service components. Initial work removed attribute from getAttributes, but that caused problems from the manageable web tier action methods create and update. To account for this, allow the attribute as argument to the methods, but do not call the corresponding setter. </action> <action dev="vancek" type="fix"> Moved the @Version annotation to the entity attribute. It had no effect on the getter method. Removed all annotations on the corresponding getter method. </action> <action dev="vancek" type="update"> Render the @Table annotation on every entity to avoid application server detting the default table name mapped to by this entity. Currently, the annotation is only rendered when there is an inheritence hierarchy or a mapped superclass. </action> <action dev="vancek" type="update"> Update the default Collection for one-to-many and many-to-many associations to the java.util.SortedSet (in namespace.xml). Moving away from bag collection as the default since it is unnecessary in the majority of cases. As a result, the @org.hibernate.annotations.Sort annotation is also rendered with a NATURAL sort type. The create and update methods of the manageable service implementation wraps the retrieved bag collection(List) for the 'many' side of the association with an appropriate collection implementation (unless java.util.List is specified as the default). </action> <action dev="vancek" type="fix"> Ignore the argument on create and update methods of DAO implementation components where the corresponding entity attribute is modelled as an optimistic lock value with the Version stereotype. This should be improved to eliminate the attribute when retrieving the attribute collection. </action> <action dev="vancek" type="update"> Each finder is overloaded in the DAO components. One finder method that doesn't supply a manual query argument should use the NamedQuery defined on the corresponding entity. Currently, it generates the query. </action> <action dev="vancek" type="fix"> Minor fixes to the EJBQL of the finder methods in the manageable service base for manageable entities. </action> <action dev="vancek" type="fix"> In the findAll method of the manageable service base implementation, the query now includes 'left join fetch' for all related 'many' association ends where the target entity does not define a display attribute (where the attribute is modelled with the Unique stereotype). </action> <action dev="vancek" type="update"> Updated the metafacade definitions of EJB3AssociationEndFacadeLogicImpl, EJB3AssociationEndFacadeLogicImpl and EJB3MessageDrivenOperationFacadeLogicImpl in metafacade.xml. </action> <action dev="vancek" type="add"> Added support for default list, set and map type implementations for collection association ends in namespace.xml. Also added the ability for association end collection index name and type (further map support) to be specified via tagged values @andromda.persistence.collection.index and @andromda.persistence.collection.index.type. This introduced a new facade called EJB3TypeFacade. Every collection type association end now instantiates the corresponding implementation upon declaration. </action> <action dev="vancek" type="fix"> Fixed isRequired in EJB3AssociationEndFacade and EJB3EntityAttributeFacade to exclude property if the entity has a generalization to an mapped superclass. </action> <action dev="vancek" type="update"> EJB3ManageableEntityAssociationEndFacade now also extends EJB3AssociationEndFacade with precedence tagged value set. EJB3ManageableEntityAttributeFacade also extends EJB3EntityAttributeFacade. This eliminates the need for the existing overwritten methods in the manageable entity facades. </action> <action dev="vancek" due-to="tlu" type="fix"> JIRA EJB-34 - Fix erroneous signature of entity constructor where no entity attributes exist but navigable associations do exist. </action> <action dev="vancek" type="update"> Revert the build back to using the default Java compiler (1.4) - 1.5 isn't supported for the automated build process for andromda-plugins. </action> <action dev="vancek" due-to="tlu" type="add"> JIRA EJB-31 - Add support for a select few meta type annotations for attribues in embedded value classes. Need to confirm if @Transient, @Version, @Lob and @Basic are supported. @Column, @Temporal and @Enumerated have been confirmed to work. </action> <action dev="vancek" due-to="tlu" type="add"> JIRA EJB-32 - Add support for embedded value object associations as well as attribute overrides. NOTE: This is still partial support. The association mutators need to be added with appropriate annotation to the embedded value object base abstract class. </action> <action dev="vancek" due-to="tlu" type="fix"> JIRA EJB-33 - Fix problem when there are two embedded value objects of the same type in the same entity. Fix for both attribute and association overrides. </action> <action dev="vancek" due-to="tlu" type="update"> JIRA EJB-29 - the implementation class of the embedded value object was unused and the base class was abstract. This is now fixed with the introduction of the orm.xml deployment descriptor. Currently, only the embeddable classes are defined. As a result the @Embeddable annotation is removed from the base abstract class and the embeddable implementation class is now the defined as the embeddable class using orm.xml rather than metadata annotation. </action> <action dev="vancek" due-to="pawel" type="fx"> JIRA EJB-36 - Entities and composite primary keys now implement Comparable interface and implement the compareTo method. @org.hibernate.annotations.Sort annotation is only set if the collection interface for an association end is defined as java.util.SortedSet. </action> <action dev="vancek" type="add"> Added basic JBoss Seam documentation to site docs. </action> <action dev="vancek" due-to="tlu" type="fix"> JIRA EJB-37 - Fix problem with service delegate switch statement where the break statement should not be issued after a return statement. </action> <action dev="vancek" due-to="sverker" type="fix"> JIRA EJB-38 - The query in the DAO base class for finder methods with argument enum type has to set the enum class as the parameter for the querty, not the value (name or ordinal). </action> <action dev="vancek" type="fix"> Reset EJB3ManageableEntityAttributeFacade metafacade mapping in metafacades.xml from using property element to use context element. Otherwise, manageable entity attributes would map to EJB3EntityAttributeFacade. This resulted in getTemporalType being refactored in EJB3EntityAttributeFacade and the overriding instance in EJB3ManageableEntityAttributeFacade to be removed. </action> <action dev="vancek" type="fix"> The getter (for BLOB type manageable attributes) in the manageable service base implementation must cast the single result to appropriate type before returning. </action> <action dev="vancek" type="add"> Add @RolesAllowed annotation with permitted roles authorised to access the manageable service. This was achieved by introducing a new namespace property called <b>manageableRolesAllowed</b> rather than defined by actors with dependencies on the manageable entity. A corresponding getManageableRolesAllowed is available through EJB3ManageableEntityFacade to retrieve the formatted comma separated list of roles. </action> <action dev="vancek" type="fix"> Modelling non-public operations on session beans rendered incorrect method signatures. This fix will generate correct signatures for all operations, but only public methods are exposed in the remote/local interfaces and service base class. </action> <action dev="vancek" type="update"> Updated the cartridge.xml to set the outlet for the enumerations template to a new outlet called user-types. This is defined in namespace.xml and must exist in each project andromda.xml. </action> <action dev="vancek" due-to="sverker" type="update"> JIRA EJB-39 - Add serialVersionUID to DaoDefaultException. </action> <action dev="vancek" due-to="KnisterPeter" type="update"> Changed defaultCollectionInterface namespace property to java.util.TreeSet from java.util.SortedSet. This eliminates the need for the @org.hibernate.annotations.Sort annotation on collection association ends. Aim is to decouple the EJB3 cartridge (with default settings) to Hibernate. </action> <action dev="vancek" type="fix"> It is invalid to specify an implementation for defaultCollectionInterfac. This must specify an interface. Changed from java.util.TreeSet to java.util.Set. </action> <action dev="vancek" type="fix"> Allow the ability to specify unidirectional associations without having to specify an aggregation or composition end. The non-navigable end is assumed to be the owning end of the association. This fix renders the mappedBy property for OneToOne annotations on the inverse side of the association. </action> <action dev="vancek" due-to="sverker" type="fix"> JIRA EJB-40 - Fix support for modelling map associations ends. "The attached patch solves this issue as well as providing an improvement in regards to List associations. If no OrderBy tagged value is provided, the IndexColumn annotation is used (hibernate extension) to provide true list association." - The hibernate annotation needs to be switched depending on the persistence provider. This will be fixed once a namespace property is introduced along the lines of persistenceProvider. </action> <action dev="vancek" type="add"> Generate JBoss MQ destinations service XML descriptor when hot deployed under JBoss, creates the Queue/Topics. </action> <action dev="vancek" due-to="KnisterPeter" type="update"> Added new namespace property persistenceProviderExtensions. Default value is none. Currently, ony hibernate extensions are supported. If set to hibernate, then hibernate specifc annotations are rendered in appropriate locations based on the model. </action> <action dev="vancek" type="update"> Updated installation howto to give more accurate directions on getting and building the EJB3 cartridge. </action> <action dev="vancek" due-to="sverker" type="update"> JIRA EJB-41 - Cleaned unused imports and some calls to deprecated methods changed to their replacements. </action> <action dev="vancek" due-to="sverker" type="fix"> JIRA EJB-42 - Fix IllegalStateException "it is illegal to inject UserTransaction into a CMT bean" where a session bean is modelled with bean managed transactions. This fix sets the <b>transaction-type</b> for the session to <b>Bean</b> instead of <b>Container</b>. This does not affect manageable entity session POJOs as they remain container managed transaction demarcation. </action> <action dev="vancek" due-to="Bertl" type="fix"> JIRA EJB-43 - Fix issues with the default setup of association cascade properties, in particular adding support for multiple cascade options for the default cascade property on entities. Fix the naming issue with entityAggregationCascade. </action> <action dev="vancek" type="fix"> EJB3MessageDrivenFacade.getDestinationType requires search and replace for destination type retrieved from TV. i.e. replace all '_' with '.'. Also fix casing for javax.jms.Queue and javax.jms.Topic. </action> <action dev="vancek" type="add"> UMLMETA-78 - Add support for member variables within type safe enumerations. </action> <action dev="vancek" type="add"> Demo EJB3 added to andromda-plugins/samples accompanied by quick site docs. </action> <action dev="vancek" type="fix"> Fix getIdentifier naming in EJB3EntityFacade which eliminates the workaround solution in EJB3ManageableEntityFacade. </action> <action dev="vancek" due-to="markh" type="fix"> JIRA EJB-45 - ClassCastException when setting Manageable stereotype on entities. The EJB3ManageableEntityAttributeFacade was not being picked up correctly. Instead, the emf.uml2.ManageableEntityAttributeFacade was used. The fix was to simply override the methods returning attributes and identifiers in EJB3ManageableEntityFacade. </action> <action dev="vancek" due-to="harwey" type="fix"> JIRA EJB-46 - Missing javax.ejb.Timer attribute for method on session bean modelled as a timeout callback. </action> <action dev="vancek" due-to="turekvl" type="fix"> Fix in GlobalMacros.vm to prevent compareTo action on entity properties with Collection/List/Set types. </action> <action dev="vancek" due-to="harwey" type="fix"> Add javax.jms.MessageListener messaging-type to ejb-jar.xml for MDBs. </action> <action dev="vancek" type="update"> Migrated dependency versions from 3.2-SNAPSHOT to 3.2, overriding dependencies in the pom.xml. NOTE: This can be removed once the andromda-plugins package is upgraded as a whole. </action> <action dev="vancek" type="update"> Added maven-changelog-plugin, taglist-maven-plugin and jdepend-maven-plugin reporting. Also added scm settings to project pom.xml. </action> <action dev="vancek" due-to="tp" type="fix"> JIRA-48 - Fix misspelt property names in EntityEmbeddable.vsl for table and sequence generator types. </action> <action dev="vancek" type="update"> Moved the changes.xml to src/site. </action> </release> </body> </document> 1.10 +104 -49 cartridges/andromda-ejb3/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/pom.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- pom.xml 14 Sep 2006 14:23:35 -0000 1.9 +++ pom.xml 18 Dec 2006 02:02:34 -0000 1.10 @@ -16,6 +16,12 @@ <system>jira</system> <url>http://galaxy.andromda.org/jira/BrowseProject.jspa?id=10011</url> </issueManagement> + <scm> + <connection>scm:cvs:pserver:anonymous:@andromdaplugins.cvs.sourceforge.net:/cvsroot/andromdaplugins:andromda-plugins/cartridges/andromda-ejb3</connection> + <developerConnection>scm:cvs:ext:${cvs_username}@andromdaplugins.cvs.sourceforge.net:/cvsroot/andromdaplugins:andromda-plugins/cartridges/andromda-ejb3</developerConnection> + <tag>HEAD</tag> + <url>http://andromdaplugins.cvs.sourceforge.net/</url> + </scm> <developers> <developer> <id>vancek</id> @@ -38,34 +44,74 @@ <timezone>-6</timezone> </developer> </developers> + <dependencies> + <dependency> + <groupId>org.andromda</groupId> + <artifactId>andromda-core</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda</groupId> + <artifactId>andromda-utils</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda.metafacades</groupId> + <artifactId>andromda-metafacades-uml</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda.metafacades</groupId> + <artifactId>andromda-metafacades-uml14</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda.cartridges</groupId> + <artifactId>andromda-meta-cartridge</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda.translationlibraries</groupId> + <artifactId>andromda-ocl-validation-library</artifactId> + <version>3.3-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.andromda.profiles.uml14</groupId> + <artifactId>andromda-profile</artifactId> + <type>xml.zip</type> + <version>3.3-SNAPSHOT</version> + </dependency> + </dependencies> <build> <plugins> <plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-maven-plugin</artifactId> + <version>3.3-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.andromda.cartridges</groupId> <artifactId>andromda-meta-cartridge</artifactId> - <version>3.2-SNAPSHOT</version> + <version>3.3-SNAPSHOT</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.andromda.maven.plugins</groupId> <artifactId>andromda-cartridge-plugin</artifactId> + <version>3.3-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.andromda.translationlibraries</groupId> <artifactId>andromda-ocl-query-library</artifactId> - <version>3.2-SNAPSHOT</version> + <version>3.3-SNAPSHOT</version> </dependency> </dependencies> </plugin> <plugin> - <groupId>org.andromda.maven.site</groupId> + <groupId>org.andromda.maven.plugins.site</groupId> <artifactId>andromda-site-plugin</artifactId> - <version>3.2-SNAPSHOT</version> + <version>3.3-SNAPSHOT</version> <executions> <execution> <id>profile-transform</id> @@ -86,9 +132,9 @@ <artifactId>maven-site-plugin</artifactId> <dependencies> <dependency> - <groupId>org.andromda.maven.site</groupId> + <groupId>org.andromda.maven.plugins.site</groupId> <artifactId>andromda-doxia-module-xdoc</artifactId> - <version>3.2-SNAPSHOT</version> + <version>3.3-SNAPSHOT</version> </dependency> </dependencies> <configuration> @@ -132,10 +178,16 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> - <!-- + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jdepend-maven-plugin</artifactId> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> + <configuration> + <xmlPath>${basedir}/src/site/changes.xml</xmlPath> + </configuration> <reportSets> <reportSet> <reports> @@ -146,6 +198,10 @@ </reportSets> </plugin> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>taglist-maven-plugin</artifactId> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> <reportSets> @@ -163,7 +219,6 @@ </reportSet> </reportSets> </plugin> - --> </plugins> </reporting> <properties> 1.2 +6 -1 cartridges/andromda-ejb3/src/site/axdoc/howto21.xml Index: howto21.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto21.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto21.xml 14 Sep 2006 14:31:29 -0000 1.1 +++ howto21.xml 18 Dec 2006 02:02:34 -0000 1.2 @@ -168,7 +168,12 @@ <p> There exists a separate Seam profile that needs to be imported into your project. This profile contains the Seam specific tags and stereotypes you need to model on your components. You can - download the profile project <a href="andromda-profiles-seam-1.0-SNAPSHOT.zip">here</a>. + get this profile by if you have checked out the latest <i>andromda-plugins</i> project from + <b>HEAD</b> (follow <a href="installation.html">Installation</a>) and build the + <b>Profiles</b> project. Once this is done, the profile will be copied to your M2 repository + under <i>M2_REPO/org/andromda/plugins/profiles/uml14/andromda-plugins-profile-seam/VERSION/</i>. + You can then import this <i>andromda-plugins-profile-seam-VERSION.zml.zip</i> profile into your + model to utilise the Seam components. </p> </subsection> </section> 1.3 +5 -4 cartridges/andromda-ejb3/src/site/axdoc/howto5.xml Index: howto5.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto5.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- howto5.xml 6 Oct 2006 02:06:31 -0000 1.2 +++ howto5.xml 18 Dec 2006 02:02:34 -0000 1.3 @@ -9,14 +9,15 @@ <p> You might have noticed the attribute named <code>carType</code> in the <code>Car</code> entity. It is is of type <code>String</code>, while in fact it makes more sense to restrict the set of possible - values for this attribute. This can be achieved using <i>type-safe enumerations</i>. + values for this attribute. This can be achieved using <i>Java5 type-safe enumerations</i>. This is the topic discussed on this page. </p> <p> - Type-safe enumerations are modelled by means of a regular class, only this time you need + Java5 type-safe enumerations are modelled by means of a regular class in UML, only this time you need to use the <![CDATA[<<Enumeration>>]]> stereotype. All attributes on such an enumeration will be known as enumeration literals, they will assume the default values you assign to the attributes, - or the name of the attribute if the default value is missing. + or the name of the attribute if the default value is missing. This will generate your Java5 + <b>enum</b> object containing your literals. </p> <p> In the EJB3 cartridge, enumerations are <i>NOT</i> persisted behind the scenes, unlike the @@ -101,7 +102,7 @@ </p> <p> To use the ordinal values relating to the literals of the type-safe enumeration class, - you do not need to do model the <code>@andromda.persistence.enumeration.type</code> + you do not need to model the <code>@andromda.persistence.enumeration.type</code> tagged value. By default, if an entity attribute has an enumeration type, the ordinal values of the enumeration literals are used. </p> 1.2 +1 -1 cartridges/andromda-ejb3/src/site/axdoc/howto9.xml Index: howto9.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto9.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- howto9.xml 14 Sep 2006 14:31:28 -0000 1.1 +++ howto9.xml 18 Dec 2006 02:02:34 -0000 1.2 @@ -68,7 +68,7 @@ </p> <p> <ul> - <li class="gen"><a class="changed" href="src/org/andromda/test/howto9/a/Vehicle.java"><code>Vehicle.java</code></a></li> + <li class="gen"><a class="changed" href="src/org/andromda/test/howto9/a/VehicleEmbeddable.java"><code>VehicleEmbeddable.java</code></a></li> <li class="gen"><a class="changed" href="src/org/andromda/test/howto9/a/CarEmbeddable.java"><code>CarEmbeddable.java</code></a></li> <li class="impl"><a class="changed" href="src/org/andromda/test/howto9/a/Car.java"><code>Car.java</code></a></li> <li class="gen"><a href="src/org/andromda/test/howto9/a/CarType.java"><code>CarType.java</code></a></li> 1.48 +217 -224 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2007-02-04 02:45:12
|
User: vancek Date: 07/02/03 18:45:08 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3SessionOperationFacadeLogicImpl.java EJB3SessionFacadeLogicImpl.java andromda-ejb3/src/main/resources/META-INF/andromda cartridge.xml metafacades.xml namespace.xml andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Added: andromda-ejb3/src/main/resources/templates/ejb3/microcontainer ejb3-interceptors-aop.xml.vsl jndi.properties.vsl login-config.xml.vsl log4j.xml.vsl default.persistence.properties.vsl embedded-jboss-beans.xml.vsl users.properties.vsl security-beans.xml.vsl jboss-jms-beans.xml.vsl roles.properties.vsl andromda-ejb3/src/main/resources/templates/ejb3/test SessionTest.vsl EJB3Container.vsl testng.xml.vsl Log: add TestNG and JBoss Embeddable Microcontainer support for generating basic testng tests for each modelled session bean Revision Changes Path 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/ejb3-interceptors-aop.xml.vsl Index: ejb3-interceptors-aop.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE aop PUBLIC "-//JBoss//DTD JBOSS AOP 1.0//EN" "http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd"> <aop> <interceptor class="org.jboss.aspects.remoting.InvokeRemoteInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.aspects.security.SecurityClientInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.aspects.tx.ClientTxPropagationInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.remoting.IsLocalInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.aspects.remoting.ClusterChooserInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/> <stack name="ServiceClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="AsynchronousStatelessSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="AsynchronousStatefulSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="StatelessSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="StatefulSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="ClusteredStatelessSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <stack name="ClusteredStatefulSessionClientInterceptors"> <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/> <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/> <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/> </stack> <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/> <interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/> <interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/> <interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/> <interceptor factory="org.jboss.ejb3.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/> <interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/> <interceptor class="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.stateful.StatefulInstanceInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.service.ServiceSingletonInterceptor" scope="PER_VM"/> <interceptor class="org.jboss.ejb3.cache.StatefulReplicationInterceptor" scope="PER_VM"/> <interceptor factory="org.jboss.ejb3.stateful.StatefulRemoveFactory" scope="PER_CLASS_JOINPOINT"/> <interceptor factory="org.jboss.ejb3.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/> <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/> <interceptor factory="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory" scope="PER_CLASS"/> <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/> <interceptor factory="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory" scope="PER_CLASS"/> <interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/> <domain name="Stateless Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000) </annotation> </domain> <domain name="JACC Stateless Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="JACC Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000) </annotation> </domain> <domain name="Base Stateful Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->@javax.ejb.Remove(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> </bind> #set ($tmpstr = "$") <bind pointcut="execution(public * ${tmpstr}instanceof{javax.ejb.SessionSynchronization}->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))"> <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000) </annotation> </domain> <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true"> <!-- NON Clustered cache configuration --> <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300) </annotation> <!-- Clustered cache configuration --> <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300) </annotation> </domain> <domain name="JACC Stateful Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="JACC Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->@javax.ejb.Remove(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> </bind> <bind pointcut="execution(public * ${tmpstr}instanceof{javax.ejb.SessionSynchronization}->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))"> <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000) </annotation> <!-- NON Clustered cache configuration --> <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300) </annotation> <!-- Clustered cache configuration --> <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class) </annotation> <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)"> @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300) </annotation> </domain> <domain name="Embedded Stateful Bean" extends="Base Stateful Bean" inheritBindings="true"> <!-- NON Clustered cache configuration --> <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)"> @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class) </annotation> </domain> <domain name="Message Driven Bean"> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000) </annotation> </domain> <domain name="Consumer Bean"> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> </bind> <bind pointcut="execution(public * *->*(..)) AND (has(* *->@org.jboss.annotation.ejb.CurrentMessage(..)) OR hasfield(* *->@org.jboss.annotation.ejb.CurrentMessage))"> <interceptor-ref name="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"> @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000) </annotation> </domain> <domain name="Service Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> </bind> <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))"> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> </bind> <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())"> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> </domain> <domain name="JACC Service Bean"> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> </bind> <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))"> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> <bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> </bind> <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())"> <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/> </bind> </domain> </aop> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/jndi.properties.vsl Index: jndi.properties.vsl =================================================================== java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/login-config.xml.vsl Index: login-config.xml.vsl =================================================================== <?xml version='1.0'?> <!DOCTYPE policy PUBLIC "-//JBoss//DTD JBOSS Security Config 3.0//EN" "http://www.jboss.org/j2ee/dtd/security_config.dtd"> <!-- The XML based JAAS login configuration read by the org.jboss.security.auth.login.XMLLoginConfig mbean. Add an application-policy element for each security domain. The outline of the application-policy is: <application-policy name="security-domain-name"> <authentication> <login-module code="login.module1.class.name" flag="control_flag"> <module-option name = "option1-name">option1-value</module-option> <module-option name = "option2-name">option2-value</module-option> ... </login-module> <login-module code="login.module2.class.name" flag="control_flag"> ... </login-module> ... </authentication> </application-policy> $Revision: 1.1 $ --> <policy> <!-- Used by clients within the application server VM such as mbeans and servlets that access EJBs. --> <application-policy name="client-login"> <authentication> <login-module code="org.jboss.security.ClientLoginModule" flag="required"> <!-- Any existing security context will be restored on logout --> <module-option name="restore-login-identity">true</module-option> </login-module> </authentication> </application-policy> <application-policy name="other"> <!-- A simple server login module, which can be used when the number of users is relatively small. It uses two properties files: users.properties, which holds users (key) and their password (value). roles.properties, which holds users (key) and a comma-separated list of their roles (value). The unauthenticatedIdentity property defines the name of the principal that will be used when a null username and password are presented as is the case for an unuathenticated web client or MDB. If you want to allow such users to be authenticated add the property, e.g., unauthenticatedIdentity="nobody" --> <authentication> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/> </authentication> </application-policy> #if ($stringUtils.isNotBlank(${securityRealm})) <application-policy name="${securityRealm}"> <!-- A simple server login module, which can be used when the number of users is relatively small. It uses two properties files: users.properties, which holds users (key) and their password (value). roles.properties, which holds users (key) and a comma-separated list of their roles (value). The unauthenticatedIdentity property defines the name of the principal that will be used when a null username and password are presented as is the case for an unuathenticated web client or MDB. If you want to allow such users to be authenticated add the property, e.g., unauthenticatedIdentity="nobody" --> <authentication> <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/> </authentication> </application-policy> #end </policy> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/log4j.xml.vsl Index: log4j.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- ===================================================================== --> <!-- --> <!-- Log4j Configuration --> <!-- --> <!-- ===================================================================== --> <!-- $Id: log4j.xml.vsl,v 1.1 2007/02/04 02:45:05 vancek Exp $ --> <!-- | For more configuration infromation and examples see the Jakarta Log4j | owebsite: http://jakarta.apache.org/log4j --> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="Target" value="System.out"/> <param name="Threshold" value="WARN"/> <layout class="org.apache.log4j.PatternLayout"> <!-- The default pattern: Date Priority [Category] Messagen --> <!-- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/> --> <param name="ConversionPattern" value="%-5p %d{dd-MM HH:mm:ss,SSS} (%F:%M:%L) -%m%n"/> </layout> </appender> <root> <appender-ref ref="CONSOLE"/> </root> </log4j:configuration> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/default.persistence.properties.vsl Index: default.persistence.properties.vsl =================================================================== hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup #hibernate.connection.release_mode=after_statement #hibernate.transaction.flush_before_completion=false #hibernate.transaction.auto_close_session=false #hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory #hibernate.hbm2ddl.auto=create-drop #hibernate.hbm2ddl.auto=create hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider # Clustered cache with TreeCache #hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook #hibernate.treecache.mbean.object_name=jboss.cache:service=EJB3EntityTreeCache #hibernate.dialect=org.hibernate.dialect.HSQLDialect hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces hibernate.bytecode.use_reflection_optimizer=false # I don't think this is honored, but EJB3Deployer uses it hibernate.bytecode.provider=javassist 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/embedded-jboss-beans.xml.vsl Index: embedded-jboss-beans.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer:2.0"> <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/> <bean name="InitialContextProperties" class="java.util.Hashtable"> <constructor> <parameter class="java.util.Map"> <map keyClass="java.lang.String" valueClass="java.lang.String"> <entry> <key>java.naming.factory.initial</key> <value>org.jnp.interfaces.LocalOnlyContextFactory</value> </entry> <entry> <key>java.naming.factory.url.pkgs</key> <value>org.jboss.naming:org.jnp.interfaces</value> </entry> </map> </parameter> </constructor> </bean> <bean name="java:comp/Initializer" class="org.jboss.ejb3.embedded.JavaCompInitializer"> <property name="jndiProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="XidFactory" class="org.jboss.tm.XidFactoryImpl"/> <bean name="XidFactoryMBean" class="org.jboss.ejb3.embedded.XidFactoryMBean"> <constructor> <parameter class="org.jboss.tm.XidFactoryBase"> <inject bean="XidFactory"/> </parameter> </constructor> </bean> <bean name="TransactionManagerInitializer" class="org.jboss.tm.TransactionManagerInitializer"> <property name="xidFactory"><inject bean="XidFactory"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="UserTransaction" class="org.jboss.ejb3.embedded.UserTransactionImpl"> <demand>TransactionManagerInitializer</demand> </bean> <bean name="UserTransactionBinding" class="org.jboss.ejb3.embedded.JndiBinder"> <property name="jndiProperties"><inject bean="InitialContextProperties"/></property> <property name="target"><inject bean="UserTransaction"/></property> <property name="bindTo">UserTransaction</property> <property name="serializable">false</property> </bean> <bean name="TransactionManager" class="java.lang.Object"> <constructor factoryMethod="getTransactionManager"> <factory bean="TransactionManagerInitializer"/> </constructor> </bean> <bean name="CachedConnectionManager" class="org.jboss.resource.connectionmanager.CachedConnectionManagerReference"> <property name="transactionManager"><inject bean="TransactionManager"/></property> </bean> <!-- <bean class="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic,database=localDB"> <property name="database">localDB</property> <property name="inProcessMode">true</property> <property name="dbDataDir">.</property> </bean> --> <bean name="DefaultDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">org.hsqldb.jdbcDriver</property> <property name="connectionURL">jdbc:hsqldb:.</property> <!-- <property name="connectionURL">jdbc:hsqldb:./hypersonic/localDB</property> --> <property name="userName">sa</property> <property name="jndiName">java:/DefaultDS</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"><inject bean="TransactionManager"/></property> <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="DefaultDS" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="DefaultDSBootstrap"/> </constructor> </bean> #if ($stringUtils.isNotBlank(${entityManagerName})) <bean name="${entityManagerName}DatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">com.mysql.jdbc.Driver</property> <property name="connectionURL">jdbc:mysql://localhost:3306/${entityManagerName}</property> <!-- <property name="connectionURL">jdbc:hsqldb:./hypersonic/localDB</property> --> <property name="userName">sa</property> <property name="jndiName">java:/jdbc/${entityManagerName}</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"><inject bean="TransactionManager"/></property> <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="jdbc/${entityManagerName}" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="${entityManagerName}DatasourceBootstrap"/> </constructor> </bean> #end <!-- <bean name="TimerServiceFactory" class="org.jboss.ejb3.timerservice.quartz.QuartzTimerServiceFactory"> <property name="properties"> org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT org.quartz.jobStore.nonManagedTXDataSource=myDS org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.HSQLDBDelegate org.quartz.jobStore.tablePrefix=QRTZ_ org.quartz.jobStore.dataSource=myDS # To get it to work with hypersonic # FIXME: this doesn't lock the row org.quartz.jobStore.selectWithLockSQL=SELECT * FROM qrtz_locks WHERE lock_name = ? # from quartz.properties org.quartz.scheduler.instanceName=JBossEJB3QuartzScheduler org.quartz.scheduler.rmi.export=false org.quartz.scheduler.rmi.proxy=false org.quartz.scheduler.wrapJobExecutionInUserTransaction=false org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount=10 org.quartz.threadPool.threadPriority=5 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true org.quartz.jobStore.misfireThreshold=60000 </property> <property name="dataSource">java:/DefaultDS</property> <property name="sqlProperties"> CREATE_DB_ON_STARTUP = TRUE CREATE_TABLE_JOB_DETAILS = CREATE TABLE qrtz_job_details(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, \ DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, \ IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, \ JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP)) CREATE_TABLE_JOB_LISTENERS = CREATE TABLE qrtz_job_listeners(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, \ JOB_LISTENER VARCHAR(80) NOT NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER), FOREIGN KEY (JOB_NAME,JOB_GROUP) \ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)) CREATE_TABLE_TRIGGERS = CREATE TABLE qrtz_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, \ JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, DESCRIPTION VARCHAR(120) NULL, \ NEXT_FIRE_TIME NUMERIC(13) NULL, PREV_FIRE_TIME NUMERIC(13) NULL, TRIGGER_STATE VARCHAR(16) NOT NULL, \ TRIGGER_TYPE VARCHAR(8) NOT NULL, START_TIME NUMERIC(13) NOT NULL, END_TIME NUMERIC(13) NULL, CALENDAR_NAME VARCHAR(80) NULL, \ MISFIRE_INSTR NUMERIC(2) NULL, JOB_DATA BINARY NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (JOB_NAME,JOB_GROUP) \ REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)) CREATE_TABLE_SIMPLE_TRIGGERS = CREATE TABLE qrtz_simple_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \ TRIGGER_GROUP VARCHAR(80) NOT NULL, REPEAT_COUNT NUMERIC(7) NOT NULL, REPEAT_INTERVAL NUMERIC(12) NOT NULL, \ TIMES_TRIGGERED NUMERIC(7) NOT NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)) CREATE_TABLE_CRON_TRIGGERS = CREATE TABLE qrtz_cron_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \ TRIGGER_GROUP VARCHAR(80) NOT NULL, CRON_EXPRESSION VARCHAR(80) NOT NULL, TIME_ZONE_ID VARCHAR(80), \ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)) CREATE_TABLE_BLOB_TRIGGERS = CREATE TABLE qrtz_blob_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \ TRIGGER_GROUP VARCHAR(80) NOT NULL, BLOB_DATA BINARY NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), \ FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)) CREATE_TABLE_TRIGGER_LISTENERS = CREATE TABLE qrtz_trigger_listeners(TRIGGER_NAME VARCHAR(80) NOT NULL, \ TRIGGER_GROUP VARCHAR(80) NOT NULL, TRIGGER_LISTENER VARCHAR(80) NOT NULL, \ PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \ REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)) CREATE_TABLE_CALENDARS = CREATE TABLE qrtz_calendars(CALENDAR_NAME VARCHAR(80) NOT NULL, CALENDAR BINARY NOT NULL, \ PRIMARY KEY (CALENDAR_NAME)) CREATE_TABLE_PAUSED_TRIGGER_GRPS = CREATE TABLE qrtz_paused_trigger_grps(TRIGGER_GROUP VARCHAR(80) NOT NULL, \ PRIMARY KEY (TRIGGER_GROUP)) CREATE_TABLE_FIRED_TRIGGERS = CREATE TABLE qrtz_fired_triggers(ENTRY_ID VARCHAR(95) NOT NULL, TRIGGER_NAME VARCHAR(80) NOT NULL, \ TRIGGER_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, INSTANCE_NAME VARCHAR(80) NOT NULL, \ FIRED_TIME NUMERIC(13) NOT NULL, STATE VARCHAR(16) NOT NULL, JOB_NAME VARCHAR(80) NULL, JOB_GROUP VARCHAR(80) NULL, \ IS_STATEFUL VARCHAR(1) NULL, REQUESTS_RECOVERY VARCHAR(1) NULL, PRIMARY KEY (ENTRY_ID)) CREATE_TABLE_SCHEDULER_STATE = CREATE TABLE qrtz_scheduler_state(INSTANCE_NAME VARCHAR(80) NOT NULL, \ LAST_CHECKIN_TIME NUMERIC(13) NOT NULL, CHECKIN_INTERVAL NUMERIC(13) NOT NULL, RECOVERER VARCHAR(80) NULL, \ PRIMARY KEY (INSTANCE_NAME)) CREATE_TABLE_LOCKS = CREATE TABLE qrtz_locks(LOCK_NAME VARCHAR(40) NOT NULL, PRIMARY KEY (LOCK_NAME)) INSERT_TRIGGER_ACCESS = INSERT INTO qrtz_locks values('TRIGGER_ACCESS') INSERT_JOB_ACCESS = INSERT INTO qrtz_locks values('JOB_ACCESS') INSERT_CALENDAR_ACCESS = INSERT INTO qrtz_locks values('CALENDAR_ACCESS') INSERT_STATE_ACCESS = INSERT INTO qrtz_locks values('STATE_ACCESS') INSERT_MISFIRE_ACCESS = INSERT INTO qrtz_locks values('MISFIRE_ACCESS') </property> </bean> --> </deployment> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/users.properties.vsl Index: users.properties.vsl =================================================================== admin=admin user=password 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/security-beans.xml.vsl Index: security-beans.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer:2.0"> <bean class="org.jboss.ejb3.embedded.JaasSecurityManagerService" name="jboss.security:service=JaasSecurityManager"> <property name="initialContextProperties"> <inject bean="InitialContextProperties"/> </property> </bean> </deployment> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/jboss-jms-beans.xml.vsl Index: jboss-jms-beans.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"> <bean name="jboss.mq:service=JMSProviderLoader,name=JMSProvider" class="org.jboss.jms.jndi.JNDIProviderAdapter"> <property name="factoryRef">java:/XAConnectionFactory</property> <property name="queueFactoryRef">java:/XAConnectionFactory</property> <property name="topicFactoryRef">java:/XAConnectionFactory</property> <property name="properties" class="java.util.Properties"> <map keyClass="java.lang.String" valueClass="java.lang.String"> <entry> <key>java.naming.factory.initial</key> <value>org.jnp.interfaces.LocalOnlyContextFactory</value> </entry> <entry> <key>java.naming.factory.url.pkgs</key> <value>org.jboss.naming:org.jnp.interfaces</value> </entry> </map> </property> </bean> <bean name="b1" class="org.jboss.ejb3.embedded.JndiBinder"> <property name="jndiProperties"><inject bean="InitialContextProperties"/></property> <property name="target"><inject bean="jboss.mq:service=JMSProviderLoader,name=JMSProvider"/></property> <property name="bindTo">java:/DefaultJMSProvider</property> <property name="serializable">true</property> </bean> <bean name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool" class="org.jboss.jms.asf.StdServerSessionPoolFactory"> <property name="name">StdJMSPool</property> <property name="xidFactory"><inject bean="XidFactoryMBean"/></property> <property name="transactionManager"><inject bean="TransactionManager"/></property> </bean> <bean name="b2" class="org.jboss.ejb3.embedded.JndiBinder"> <property name="jndiProperties"><inject bean="InitialContextProperties"/></property> <property name="target"><inject bean="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool"/></property> <property name="bindTo">java:/StdJMSPool</property> <property name="serializable">false</property> </bean> <bean name="jboss.mq:service=PersistenceManager" class="org.jboss.mq.kernel.JDBC2PersistenceManager"> <property name="transactionManager"> <inject bean="TransactionManager"/> </property> <property name="datasource"> <inject bean="DefaultDS"/> </property> <property name="sqlProperties"> BLOB_TYPE=OBJECT_BLOB INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?) INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?) SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=? SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=? MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=? UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=? UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=? DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS) DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ? DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=? DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=? CREATE_MESSAGE_TABLE = CREATE CACHED TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \ DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \ MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) ) CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID) CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION) CREATE_TX_TABLE = CREATE CACHED TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) ) CREATE_TABLES_ON_STARTUP = TRUE DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T' </property> </bean> <bean name="jboss.mq:service=MessageCache" class="org.jboss.mq.kernel.MessageCache"> <property name="persistenceManager"><inject bean="jboss.mq:service=PersistenceManager"/></property> <property name="highMemoryMark">50</property> <property name="maxMemoryMark">60</property> </bean> <bean name="jms-rar-WorkManager" class="org.jboss.ejb3.embedded.resource.JBossWorkManager"> </bean> <bean name="jms-rar-DeploymentInfo" class="org.jboss.ejb3.embedded.resource.Ejb3DeploymentInfo"> <constructor> <parameter class="java.lang.String">jms-ra.rar</parameter> <parameter class="java.lang.String">javax.jms.MessageListener</parameter> <parameter class="java.lang.String">org.jboss.resource.adapter.jms.inflow.JmsActivationSpec</parameter> </constructor> </bean> <bean name="jboss.jca:name='jms-ra.rar',service=RARDeployment" class="org.jboss.ejb3.embedded.resource.RARDeployment"> <constructor> <parameter class="org.jboss.deployment.DeploymentInfo"> <inject bean="jms-rar-DeploymentInfo"/> </parameter> </constructor> <property name="workManager"><inject bean="jms-rar-WorkManager"/></property> </bean> <bean name="jboss.mq:service=StateManager" class="org.jboss.mq.kernel.JDBCStateManager"> <property name="transactionManager"> <inject bean="TransactionManager"/> </property> <property name="datasource"> <inject bean="DefaultDS"/> </property> <property name="sqlProperties"> CREATE_TABLES_ON_STARTUP = TRUE CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \ CLIENTID VARCHAR(128), PRIMARY KEY(USERID)) CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \ PRIMARY KEY(USERID, ROLEID)) CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \ SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \ SELECTOR VARCHAR(255), PRIMARY KEY(CLIENTID, SUBNAME)) GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=? LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=? GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=? INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?) UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=? REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=? GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=? GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=? POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest') POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee') POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample') POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody') POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub') POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest') POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest') POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest') POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john') POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john') POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub') POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john') POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub') POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody') </property> </bean> <bean name="BasicQueueParameters" class="org.jboss.mq.server.BasicQueueParameters"/> <bean name="jboss.mq:service=ThreadPool" class="org.jboss.util.threadpool.BasicThreadPool"> <property name="name">JMSThread</property> <property name="threadGroupName">JBossMQ Server Threads</property> <!-- The max number of threads in the pool --> <property name="maximumPoolSize">10</property> <!-- The max number of tasks before the queue is full --> <property name="maximumQueueSize">1000</property> <!-- The behavior of the pool when a task is added and the queue is full. abort - a RuntimeException is thrown run - the calling thread executes the task wait - the calling thread blocks until the queue has room discard - the task is silently discarded without being run discardOldest - check to see if a task is about to complete and enque the new task if possible, else run the task in the calling thread --> <property name="blockingModeString">run</property> </bean> <bean name="jboss.mq:service=DestinationManager" class="org.jboss.mq.server.JMSDestinationManager"> <constructor> <parameter class="org.jboss.mq.server.BasicQueueParameters"> <inject bean="BasicQueueParameters"/> </parameter> </constructor> <property name="persistenceManager"><inject bean="jboss.mq:service=PersistenceManager"/></property> <property name="messageCache"><inject bean="jboss.mq:service=MessageCache"/></property> <property name="stateManager"><inject bean="jboss.mq:service=StateManager"/></property> <property name="threadPool"><inject bean="jboss.mq:service=ThreadPool"/></property> <property name="threadGroup"><inject bean="jboss.mq:service=ThreadPool" property="threadGroup"/></property> <start method="startServer"/> <stop method="stopServer"/> </bean> <bean name="jboss.mq.destination:service=Queue,name=DLQ" class="org.jboss.mq.kernel.Queue"> <property name="destinationManagerPojo"><inject bean="jboss.mq:service=DestinationManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> <property name="destinationName">DLQ</property> </bean> <bean name="jboss.mq:service=Invoker" class="org.jboss.mq.server.JMSServerInvoker"> <property name="next"><inject bean="jboss.mq:service=DestinationManager"/></property> </bean> <bean name="jboss.mq:service=invocationlayer,type=JVM" class="org.jboss.mq.kernel.JVMIL"> <property name="jmsInvoker"><inject bean="jboss.mq:service=Invoker"/></property> <property name="connectionFactoryJNDIRef">java:/ConnectionFactory</property> <property name="XAConnectionFactoryJNDIRef">java:/XAConnectionFactory</property> <property name="pingPeriod">0</property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> </deployment> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/microcontainer/roles.properties.vsl Index: roles.properties.vsl =================================================================== admin=USER,ADMIN user=USER 1.17 +25 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionOperationFacadeLogicImpl.java Index: EJB3SessionOperationFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionOperationFacadeLogicImpl.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -r1.16 -r1.17 --- EJB3SessionOperationFacadeLogicImpl.java 17 Jan 2007 00:50:55 -0000 1.16 +++ EJB3SessionOperationFacadeLogicImpl.java 4 Feb 2007 02:45:06 -0000 1.17 @@ -28,6 +28,10 @@ public class EJB3SessionOperationFacadeLogicImpl extends EJB3SessionOperationFacadeLogic { + /** + * The property which stores the pattern used to generate the service operation test name + */ + private static final String SERVICE_OPERATION_TEST_NAME_PATTERN = "serviceOperationTestNamePattern"; public EJB3SessionOperationFacadeLogicImpl (Object metaObject, String context) { @@ -212,6 +216,27 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionOperationFacadeLogic#handleGetTestSignature() + */ + protected String handleGetTestSignature() + { + return this.getTestName() + "()"; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionOperationFacadeLogic#handleGetTestName() + */ + protected String handleGetTestName() + { + String serviceOperationTestNamePattern = + (String)this.getConfiguredProperty(SERVICE_OPERATION_TEST_NAME_PATTERN); + + return MessageFormat.format( + serviceOperationTestNamePattern, + new Object[] {StringUtils.trimToEmpty(StringUtils.capitalize(this.getName()))}); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionOperationFacadeLogic#getCall() * * Override the default implmentation to check for timer service and 1.20 +45 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java Index: EJB3SessionFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -r1.19 ... [truncated message content] |
From: Vance K. <va...@us...> - 2007-02-11 14:06:45
|
User: vancek Date: 07/02/11 06:06:39 Modified: andromda-ejb3/src/main/resources/templates/ejb3/test EJB3Container.vsl testng.xml.vsl andromda-ejb3/src/main/resources/META-INF/andromda namespace.xml metafacades.xml cartridge.xml andromda-ejb3/src/test/expected cartridge-output.zip andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3SessionFacadeLogicImpl.java EJB3MessageDrivenFacadeLogicImpl.java andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Added: andromda-ejb3/src/main/resources/templates/ejb3/test testjms.xml.vsl MessageDrivenTest.vsl Log: add MDB test within embeddable container Revision Changes Path 1.2 +33 -23 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/EJB3Container.vsl Index: EJB3Container.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/EJB3Container.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- EJB3Container.vsl 4 Feb 2007 02:45:07 -0000 1.1 +++ EJB3Container.vsl 11 Feb 2007 14:06:32 -0000 1.2 @@ -47,33 +47,43 @@ // Boot the JBoss Microcontainer with EJB3 settings, loads ejb3-interceptors-aop.xml EJB3StandaloneBootstrap.boot(null); - logger.info("==>Deploying embedded-jboss-beans"); - // Deploy CaveatEmptor beans (datasource, mostly) - //EJB3StandaloneBootstrap.deployXmlResource("embedded-jboss-beans.xml"); - //EJB3StandaloneBootstrap.deployXmlResource("ejb3-interceptors-aop.xml"); - //EJB3StandaloneBootstrap.deployXmlResource("jboss-jms-beans.xml"); - logger.info("==>Deployed embedded-jboss-beans"); - #if ($stringUtils.isNotBlank(${securityRealm})) logger.info("==>Deploying security-beans"); EJB3StandaloneBootstrap.deployXmlResource("security-beans.xml"); logger.info("==>Deployed security-beans"); + #else - /** - * Uncomment the following to enable security - * - * logger.info("==>Deploying security-beans"); - * EJB3StandaloneBootstrap.deployXmlResource("security-beans.xml"); - * logger.info("==>Deployed security-beans"); - */ +// Uncomment the following to enable security +// logger.info("==>Deploying security-beans"); +// EJB3StandaloneBootstrap.deployXmlResource("security-beans.xml"); +// logger.info("==>Deployed security-beans"); + #end +#if (!$mdbs.empty()) + logger.info("==>Deploying jboss-jms-beans - init JBoss MQ core services"); + EJB3StandaloneBootstrap.deployXmlResource("jboss-jms-beans.xml"); + logger.info("==>Deployed jboss-jms-beans"); + + logger.info("==>Configure test queue and topic"); + EJB3StandaloneBootstrap.deployXmlResource("testjms.xml"); + logger.info("==>Configured test queues and topics"); +#else +// logger.info("==>Deploying jboss-jms-beans - init JBoss MQ core services"); +// EJB3StandaloneBootstrap.deployXmlResource("jboss-jms-beans.xml"); +// logger.info("==>Deployed jboss-jms-beans"); + +// logger.info("==>Configure test queue and topic"); +// EJB3StandaloneBootstrap.deployXmlResource("testjms.xml"); +// logger.info("==>Configured test queues and topics"); + +#end + logger.info("==>Deploying ejb3"); EJB3StandaloneBootstrap.scanClasspath(); // Add all EJBs found in the archive that has this file deployer = new EJB3StandaloneDeployer(); - logger.info("==>Deploying ejb3"); // Deploy everything we got deployer.setKernel(EJB3StandaloneBootstrap.getKernel()); deployer.create(); 1.3 +5 -2 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/testng.xml.vsl Index: testng.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/testng.xml.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- testng.xml.vsl 9 Feb 2007 01:52:07 -0000 1.2 +++ testng.xml.vsl 11 Feb 2007 14:06:33 -0000 1.3 @@ -1,7 +1,7 @@ <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> -<suite name="TimeTracker Test Suite" verbose="2" parallel="false"> - <test name="Services Test"> +<suite name="${entityManagerName} Test Suite" verbose="2" parallel="false"> + <test name="${entityManagerName} Services Test"> <classes> #if($stringUtils.isNotEmpty($ejb3TypesPackage)) #**##set ($testPackage = "${ejb3TypesPackage}.test.") @@ -15,6 +15,9 @@ #foreach ($service in $services) <class name="${service.fullyQualifiedServiceTestName}"/> #end +#foreach ($mdb in $mdbs) + <class name="${mdb.fullyQualifiedMessageDrivenTestName}"/> +#end </classes> </test> </suite> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/testjms.xml.vsl Index: testjms.xml.vsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"> #foreach ($mdb in $mdbs) #**##if ($mdb.destinationTypeQueue) <bean name="jboss.mq.destination:service=Queue,name=${mdb.messageDrivenName}" class="org.jboss.mq.kernel.Queue"> <property name="destinationManagerPojo"><inject bean="jboss.mq:service=DestinationManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> <property name="destinationName">${mdb.messageDrivenName}</property> <property name="JNDIName">${mdb.destination}</property> </bean> #**##elseif ($mdb.destinationTypeTopic) <bean name="jboss.mq.destination:service=Topic,name=${mdb.messageDrivenName}" class="org.jboss.mq.kernel.Topic"> <property name="destinationManagerPojo"><inject bean="jboss.mq:service=DestinationManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> <property name="destinationName">${mdb.messageDrivenName}</property> <property name="JNDIName">${mdb.destination}</property> </bean> #**##end #end </deployment> 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/test/MessageDrivenTest.vsl Index: MessageDrivenTest.vsl =================================================================== // license-header java merge-point // // Generated by: MessageDrivenTest.vsl in andromda-ejb3-cartridge. // #if ($stringUtils.isNotBlank($mdb.testPackageName)) package $mdb.testPackageName; #end #set ($generatedFile = "${stringUtils.replace($mdb.fullyQualifiedMessageDrivenTestName,'.','/')}.java") #if($stringUtils.isNotEmpty($ejb3TypesPackage)) #**##set ($testPackage = "${ejb3TypesPackage}.test.") #else #**##set ($testPackage = "") #end import ${testPackage}EJB3Container; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Message Driven test class ${mdb.messageDrivenTestName} for testing with TestNG * Check the testng.xml for initialisation of the EJB3Container before running any tests. */ public class $mdb.messageDrivenTestName { private static final Log logger = LogFactory.getLog(${mdb.messageDrivenTestName}.class); @org.testng.annotations.Test public void test${mdb.name}() { // try // { #if ($mdb.destinationTypeQueue) // javax.jms.QueueConnection cnn = null; // javax.jms.QueueSender sender = null; // javax.jms.QueueSession session = null; // // javax.jms.Queue queue = (javax.jms.Queue)EJB3Container.getInitialContext().lookup("${mdb.destination}"); // javax.jms.QueueConnectionFactory factory = (javax.jms.QueueConnectionFactory)EJB3Container.getInitialContext().lookup("java:/ConnectionFactory"); // cnn = factory.createQueueConnection(); // session = cnn.createQueueSession(false, javax.jms.QueueSession.AUTO_ACKNOWLEDGE); // // javax.jms.TextMessage msg = session.createTextMessage("Test Message"); // // sender = session.createSender(queue); // sender.send(msg); // // Thread.sleep(1000); // session.close(); // cnn.close(); #elseif ($mdb.destinationTypeTopic) // javax.jms.TopicConnection cnn = null; // javax.jms.TopicPublisher sender = null; // javax.jms.TopicSession session = null; // // javax.jms.Topic topic = (javax.jms.Topic)EJB3Container.getInitialContext().lookup("${mdb.destination}"); // javax.jms.TopicConnectionFactory factory = (javax.jms.TopicConnectionFactory)EJB3Container.getInitialContext().lookup("java:/ConnectionFactory"); // cnn = factory.createTopicConnection(); // session = cnn.createTopicSession(false, javax.jms.TopicSession.AUTO_ACKNOWLEDGE); // // TextMessage msg = session.createTextMessage("Test Message"); // // sender = session.createPublisher(topic); // sender.send(msg); // // Thread.sleep(1000); // session.close(); // cnn.close(); #end // } // catch (Exception ex) // { // logger.warn("Failed test ${mdb.messageDrivenTestName}", ex); // } } } 1.35 +14 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -u -w -r1.34 -r1.35 --- namespace.xml 4 Feb 2007 02:45:07 -0000 1.34 +++ namespace.xml 11 Feb 2007 14:06:34 -0000 1.35 @@ -533,6 +533,20 @@ bean implementation class name. </documentation> </property> + <property name="messageDrivenTestNamePattern"> + <default>{0}Test</default> + <documentation> + The pattern to use when constructing the message driven bean + test class name. + </documentation> + </property> + <property name="messageDrivenTestPackageNamePattern"> + <default>{0}.test</default> + <documentation> + The pattern to use when constructing the package for + the message driven bean test class. + </documentation> + </property> <property name="interceptorNamePattern"> <default>{0}</default> <documentation> 1.29 +2 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml Index: metafacades.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -r1.28 -r1.29 --- metafacades.xml 4 Feb 2007 02:45:07 -0000 1.28 +++ metafacades.xml 11 Feb 2007 14:06:34 -0000 1.29 @@ -208,6 +208,8 @@ <property reference="messageDrivenImplementationNamePattern"/> <property reference="messageDrivenListenerNamePattern"/> <property reference="messageDrivenDestinationType"/> + <property reference="messageDrivenTestNamePattern"/> + <property reference="messageDrivenTestPackageNamePattern"/> </metafacade> <metafacade class="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenOperationFacadeLogicImpl"> <mapping> 1.34 +32 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -w -r1.33 -r1.34 --- cartridge.xml 4 Feb 2007 02:45:07 -0000 1.33 +++ cartridge.xml 11 Feb 2007 14:06:34 -0000 1.34 @@ -710,6 +710,23 @@ <modelElement variable="services"> <type name="org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacade"/> </modelElement> + <modelElement variable="mdbs"> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade"/> + </modelElement> + </modelElements> + </template> + + <template + path="templates/ejb3/test/testjms.xml.vsl" + outputPattern="testjms.xml" + outlet="test-config" + overwrite="true" + outputToSingleFile="true" + outputOnEmptyElements="false"> + <modelElements> + <modelElement variable="mdbs"> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade"/> + </modelElement> </modelElements> </template> @@ -724,6 +741,9 @@ <modelElement variable="services"> <type name="org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacade"/> </modelElement> + <modelElement variable="mdbs"> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade"/> + </modelElement> </modelElements> </template> @@ -739,6 +759,18 @@ </modelElements> </template> + <template + path="templates/ejb3/test/MessageDrivenTest.vsl" + outputPattern="$generatedFile" + outlet="test-impls" + overwrite="false"> + <modelElements variable="mdb"> + <modelElement> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade"/> + </modelElement> + </modelElements> + </template> + <!-- Microcontainer templates --> <template 1.3 +454 -451 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip <<Binary file>> 1.8 +3 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- changes.xml 7 Feb 2007 04:28:44 -0000 1.7 +++ changes.xml 11 Feb 2007 14:06:37 -0000 1.8 @@ -370,6 +370,9 @@ <action dev="vancek" type="fix"> Finally added cartridge tests! </action> + <action dev="vancek" type="add"> + Add support for MDB testing within embedded EJB3 container. Further customised test templates. + </action> </release> </body> </document> \ No newline at end of file 1.21 +1 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java Index: EJB3SessionFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -r1.20 -r1.21 --- EJB3SessionFacadeLogicImpl.java 4 Feb 2007 02:45:06 -0000 1.20 +++ EJB3SessionFacadeLogicImpl.java 11 Feb 2007 14:06:37 -0000 1.21 @@ -78,6 +78,7 @@ * The property which stores the pattern defining the service test package */ private static final String SERVICE_TEST_PACKAGE_NAME_PATTERN = "serviceTestPackageNamePattern"; + /** * The property which stores the pattern defining the default service bean * exception class name. 1.12 +45 -1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java Index: EJB3MessageDrivenFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- EJB3MessageDrivenFacadeLogicImpl.java 17 Jan 2007 00:50:55 -0000 1.11 +++ EJB3MessageDrivenFacadeLogicImpl.java 11 Feb 2007 14:06:37 -0000 1.12 @@ -48,6 +48,16 @@ */ private static final String MESSAGE_DRIVEN_IMPLEMENTATION_NAME_PATTERN = "messageDrivenImplementationNamePattern"; + /** + * The property which stores the pattern defining the JMS message driven bean test class name + */ + private static final String MESSAGE_DRIVEN_TEST_NAME_PATTERN = "messageDrivenTestNamePattern"; + + /** + * The property which stores the pattern defining the JMS message driven bean test package + */ + private static final String MESSAGE_DRIVEN_TEST_PACKAGE_NAME_PATTERN = "messageDrivenTestPackageNamePattern"; + // ---------------- constructor ------------------------------- public EJB3MessageDrivenFacadeLogicImpl (Object metaObject, String context) @@ -106,6 +116,17 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleGetTestPackageName() + */ + protected String handleGetTestPackageName() + { + String namespacePattern = String.valueOf(this.getConfiguredProperty(MESSAGE_DRIVEN_TEST_PACKAGE_NAME_PATTERN)); + return MessageFormat.format( + namespacePattern, + new Object[] {this.getPackageName()}); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade#getFullyQualifiedMessageDrivenImplementationName() */ protected java.lang.String handleGetFullyQualifiedMessageDrivenImplementationName() @@ -139,6 +160,17 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleGetFullyQualifiedMessageDrivenTestName() + */ + protected String handleGetFullyQualifiedMessageDrivenTestName() + { + return EJB3MetafacadeUtils.getFullyQualifiedName( + this.getTestPackageName(), + this.getMessageDrivenTestName(), + null); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade#getMessageDrivenImplementationName() */ protected java.lang.String handleGetMessageDrivenImplementationName() @@ -178,6 +210,19 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleGetMessageDrivenTestName() + */ + protected String handleGetMessageDrivenTestName() + { + String messageDrivenTestNamePattern = + (String)this.getConfiguredProperty(MESSAGE_DRIVEN_TEST_NAME_PATTERN); + + return MessageFormat.format( + messageDrivenTestNamePattern, + new Object[] {StringUtils.trimToEmpty(this.getName())}); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade#getMessageSelector() */ protected java.lang.String handleGetMessageSelector() @@ -437,5 +482,4 @@ } return excludeDefault; } - } \ No newline at end of file 1.51 +225 -280 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2007-04-16 14:09:52
|
User: vancek Date: 07/04/16 07:09:52 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBeanBase.vsl SessionBeanImpl.vsl SessionRemote.vsl Entity.vsl EntityEmbeddable.vsl SessionLocal.vsl andromda-ejb3/src/test/uml EJB3CartridgeTestModel.xml.zip andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3SessionOperationFacadeLogicImpl.java EJB3SessionAttributeFacadeLogicImpl.java EJB3MetafacadeUtils.java EJB3SessionFacadeLogicImpl.java andromda-ejb3/src/test/expected cartridge-output.zip andromda-ejb3/src/main/resources/templates/ejb3/config ejb-jar.xml.vsl persistence.xml.vsl andromda-ejb3/src/main/resources/META-INF/andromda cartridge.xml metafacades.xml namespace.xml andromda-ejb3/src/site/axdoc howto6.xml andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Added: andromda-ejb3/src/main/resources/templates/ejb3 SessionInterface.vsl andromda-ejb3/src/main/resources/templates/ejb3/config/jboss components.xml.vsl Removed: andromda-ejb3/src/main/resources/templates/ejb3 EntityImpl.vsl SessionBean.vsl Log: JBoss Seam extension corresponding to Seam cartridge release Revision Changes Path 1.12 +11 -48 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl Index: SessionBeanBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanBase.vsl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- SessionBeanBase.vsl 4 Feb 2007 02:39:07 -0000 1.11 +++ SessionBeanBase.vsl 16 Apr 2007 14:09:37 -0000 1.12 @@ -10,35 +10,24 @@ #set ($generatedFile = "${stringUtils.replace($service.fullyQualifiedServiceBaseName,'.','/')}.java") /** - * Autogenerated EJB session bean base class ${service.serviceName}. + * Autogenerated EJB3 session bean base class ${service.serviceName} which contains + * method level annotations for the session bean. All method level annotations + * are inherited by the extending session bean class. #if ($service.stateful) * * ${service.serviceName} is a stateful session bean and implements Serializable to maintain * state when bean instance not in use. #end +#if ($service.seamComponent) * + * This Seam component is defined through META-INF/components.xml rather than + * class level annotations. +#end $service.getDocumentation(" * ") */ -## -## Define the Seam component name for the class if JBoss Seam is enabled -## -#**##if ($service.seamComponent) -...@or...("${service.seamComponentName}") -#* *##if ($stringUtils.isNotBlank($service.seamComponentScopeType)) -...@or...ope(org.jboss.seam.ScopeType.${service.seamComponentScopeType}) -#* *##end -#* *##if ($service.seamComponentStartup) -...@or...artup#if ($stringUtils.isNotEmpty($service.seamComponentStartupOptions))$service.seamComponentStartupOptions#end -#* *##end -#**##end #if ($service.transactionManagement) @javax.ejb.TransactionManagement(javax.ejb.TransactionManagementType.${service.transactionManagement}) #end -#if (!$service.transactionManagementBean) -#**##if ($service.transactionType) -...@ja...ansactionAttribute(javax.ejb.TransactionAttributeType.${service.transactionType}) -#**##end -#end #if ($service.securityEnabled) #**##if ($service.persistenceContainerJboss) @org.jboss.annotation.security.SecurityDomain("${service.securityRealm}") @@ -57,33 +46,14 @@ @org.jboss.annotation.ejb.LocalBinding(jndiBinding = "${service.jndiNameLocal}") #**##end #end -#if ($service.viewTypeLocal) -@javax.ejb.Local({${service.fullyQualifiedServiceLocalInterfaceName}.class}) -#end -#if ($service.viewTypeRemote) -...@ja...mote({${service.fullyQualifiedServiceRemoteInterfaceName}.class}) -#end #if ($service.clusteringEnabled) @org.jboss.annotation.ejb.Clustered #end -#set ($interceptors = $service.interceptorReferences) -#if ($collectionUtils.size($interceptors) >= 1 || $service.listenerEnabled) -#**##if ($service.listenerEnabled) -#* *##set ($lifecycleCallback = "${service.fullyQualifiedServiceListenerName}.class") -#**##else -#* *##set ($lifecycleCallback = "") -#**##end -// Lifecycle callback listeners and interceptors are defined in ejb-jar.xml -// @javax.interceptor.Interceptors({$transform.getInterceptorsAsList(${interceptors}, ${lifecycleCallback})}) -#end -#if ($service.excludeDefaultInterceptors) -// @javax.interceptor.ExcludeDefaultInterceptors -#end public abstract class ${service.serviceBaseName} #if($service.generalization) extends ${service.generalization.fullyQualifiedServiceName} #end - implements#if ($service.viewTypeLocal) ${service.fullyQualifiedServiceLocalInterfaceName}#if ($service.viewTypeRemote),#end#end#if ($service.viewTypeRemote) ${service.fullyQualifiedServiceRemoteInterfaceName}#end#if ($service.stateful), java.io.Serializable#end + implements ${service.fullyQualifiedServiceInterfaceName}#if ($service.stateful), java.io.Serializable#end { // ------ Session Context Injection ------ @@ -367,7 +337,7 @@ $operation.getDocumentation(" * ") */ #* *##if (!$service.transactionManagementBean) -#* *##if ($operation.transactionType) +#* *##if ($stringUtils.isNotBlank($operation.transactionType)) @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.${operation.transactionType}) #* *##end #* *##end @@ -570,17 +540,10 @@ /** * Remove lifecycle method */ - @javax.ejb.Remove #* *##if ($service.seamComponent) @org.jboss.seam.annotations.Destroy #* *##end - public void destroy() { - handleDestroy(); - } - - /** - * Performs the core logic for {@link #destroy()) - */ - protected abstract void handleDestroy(); + @javax.ejb.Remove + public void destroy() {} #end } \ No newline at end of file 1.16 +36 -21 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl Index: SessionBeanImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -r1.15 -r1.16 --- SessionBeanImpl.vsl 17 Jan 2007 00:50:56 -0000 1.15 +++ SessionBeanImpl.vsl 16 Apr 2007 14:09:37 -0000 1.16 @@ -8,27 +8,54 @@ #set ($generatedFile = "${stringUtils.replace($service.fullyQualifiedServiceName,'.','/')}.java") /** - * @see ${service.fullyQualifiedServiceName} - */ -/** + * @see ${service.fullyQualifiedServiceBaseName} + * + * Remember to manually configure the local business interface this bean implements if originally you only + * defined the remote business interface. However, this change is automatically reflected in the ejb-jar.xml. + * +#if (!$service.seamComponent) * Do not specify the javax.ejb.${service.type} annotation - * Instead, define the session bean in the ejb-jar.xml descriptor - * @javax.ejb.${service.type} + * Instead, the session bean is defined in the ejb-jar.xml descriptor. */ +#else + * This session bean is a Seam component. Currently, Seam components + * must have the bean type specified via annotations. Once this has been + * fixed in Seam 1.2.1, it is enough to define the session bean + * in ejb-jar.xml and we can safely remove this annotation. + */ +@javax.ejb.${service.type} +#**##if ($service.seamComponentStartup) +...@or...artup#if ($stringUtils.isNotEmpty($service.seamComponentStartupOptions))$service.seamComponentStartupOptions#end +#**##else +// Uncomment to define Seam startup +// @org.jboss.seam.annotations.Startup#if ($stringUtils.isNotEmpty($service.seamComponentStartupOptions))$service.seamComponentStartupOptions#end + +#**##end +#end #if ($service.webServiceEnabled) @javax.jws.WebService(endpointInterface = "${service.fullyQualifiedWebServiceInterfaceName}") #else -/** - * Uncomment to enable webservices for ${service.serviceName} - *@javax.jws.WebService(endpointInterface = "${service.fullyQualifiedWebServiceInterfaceName}") - */ +// Uncomment to enable webservices for ${service.serviceName} +// @javax.jws.WebService(endpointInterface = "${service.fullyQualifiedWebServiceInterfaceName}") #end public class ${service.serviceName} extends ${service.fullyQualifiedServiceBaseName} + implements#if ($service.viewTypeLocal) ${service.fullyQualifiedServiceLocalInterfaceName}#if ($service.viewTypeRemote),#end#end#if ($service.viewTypeRemote) ${service.fullyQualifiedServiceRemoteInterfaceName}#end + { +#if ($service.stateful) + /** + * Bean serial version ID + */ + private static final long serialVersionUID = 1L; +#end + // --------------- Constructors --------------- ## Default create method with no arguments. + /** + * Default constructor extending base class default constructor + */ public ${service.serviceName}() { super(); @@ -117,16 +144,4 @@ #* *##end #**##end #end -#if ($service.stateful) - - // ----------- Destroy Method Implementation ----------- - - /** - * @see ${service.fullyQualifiedServiceName}#destroy() - */ - protected void handleDestroy() - { - //TODO: put your implementation here - } -#end } 1.8 +13 -51 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionRemote.vsl Index: SessionRemote.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionRemote.vsl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- SessionRemote.vsl 17 Jan 2007 00:50:56 -0000 1.7 +++ SessionRemote.vsl 16 Apr 2007 14:09:37 -0000 1.8 @@ -10,55 +10,23 @@ /** * Remote component interface for the ${service.serviceName} session bean. +#if ($service.seamComponent) + * The service that implement this business interface is a Seam component. The cartridge + * will not expose this interface as a Remote business interface for the bean + * component. Seam components will only have a Local business interface. +#end $service.getDocumentation(" * ") */ -public interface ${service.serviceRemoteInterfaceName} -#if ($service.generalization) - extends ${service.generalization.fullyQualifiedName}Remote +## +## Do not render this annotation if the session bean is a Seam component. +## We only expose the Local business interface for Seam components. +## +#if (!$service.seamComponent) +...@ja...mote #end +public interface ${service.serviceRemoteInterfaceName} + extends ${service.serviceInterfaceName}#if ($service.generalization), ${service.generalization.fullyQualifiedName}Remote#end { -#set ($constants = $service.constants) -#if (!$constants.empty) - - // ---------- Accessors For Constants ----------- - -#**##foreach($constant in $constants) -## Only expose the method if it is public. -#* *##if($constant.visibility == "public") - /** - * Get the $attribute.name constant -$constant.getDocumentation(" * ") - */ - public $constant.type.fullyQualifiedName ${constant.getterName}(); - -#* *##end -#**##end -#end -#set ($attributes = $service.filterSeamAttributes(${service.instanceAttributes})) -#if (!$attributes.empty) - - // --------------- Attributes --------------------- - -#**##foreach ($attribute in $attributes) -## Only expose the method to the component interface if it is public. -#* *##if ($attribute.visibility == "public") - /** - * Get the $attribute.name property -$attribute.getDocumentation(" * ") - */ - public $attribute.type.fullyQualifiedName ${attribute.getterName}(); - -#* *##if(!$attribute.readOnly) - /** - * Set the $attribute.name property - * @param value the new value - */ - public void ${attribute.setterName}($attribute.type.fullyQualifiedName value); - -#* *##end -#* *##end -#**##end -#end #set ($operations = $service.businessOperations) #if (!$operations.empty) @@ -84,10 +52,4 @@ #* *##end #**##end #end -#if ($service.stateful) - - // ------------ Lifecycle Methods ----------------- - - public void destroy(); -#end } \ No newline at end of file 1.22 +0 -11 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl Index: Entity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -r1.21 -r1.22 --- Entity.vsl 28 Feb 2007 00:56:18 -0000 1.21 +++ Entity.vsl 16 Apr 2007 14:09:38 -0000 1.22 @@ -20,17 +20,6 @@ */ @javax.persistence.Entity -#if ($entity.seamComponent) -...@or...("${entity.seamComponentName}") -#**##if ($stringUtils.isNotBlank($entity.seamComponentScopeType)) -...@or...ope(org.jboss.seam.ScopeType.${entity.seamComponentScopeType}) -#**##end -#else -// Uncomment to enable seam component name -// @org.jboss.seam.annotations.Name("${entity.seamComponentName}") -// Uncomment to set specific component scope type -//@org.jboss.seam.annotations.Scope(org.jboss.seam.ScopeType.#if ($entity.stateless)STATELESS#else#**#CONVERSATION#end) -#end @javax.persistence.Table(name = "${entity.tableName}") #if ($entity.listenerEnabled) @javax.persistence.EntityListeners({${entity.fullyQualifiedEntityListenerName}.class}) 1.47 +5 -2 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl Index: EntityEmbeddable.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl,v retrieving revision 1.46 retrieving revision 1.47 diff -u -w -r1.46 -r1.47 --- EntityEmbeddable.vsl 26 Mar 2007 12:01:06 -0000 1.46 +++ EntityEmbeddable.vsl 16 Apr 2007 14:09:38 -0000 1.47 @@ -478,9 +478,12 @@ #* *##end #* *##if ($hibernateExtensionEnabled && $entity.seamComponent) ## -## If JBoss Seam and Hibernate extensions are both enabled, add NotNull and Length annotations +## If JBoss Seam and Hibernate extensions are both enabled, add NotNull and Length annotations where required +## +#* *##if (!$attribute.columnNullable && !($entity.dynamicIdentifiersPresent && $attribute.identifier)) +## +## Only specify this validator if identifier explicity specified and explicity set as not null ## -#* *##if (!$attribute.columnNullable) @org.hibernate.validator.NotNull #* *##end #* *##if ($attribute.columnLength) 1.8 +14 -55 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionLocal.vsl Index: SessionLocal.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionLocal.vsl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- SessionLocal.vsl 17 Jan 2007 00:50:56 -0000 1.7 +++ SessionLocal.vsl 16 Apr 2007 14:09:39 -0000 1.8 @@ -10,55 +10,17 @@ /** * Local component interface for the ${service.serviceName} session bean. +#if ($service.seamComponent) + * The service that implement this business interface is a Seam component. The cartridge + * only exposes this interface as a Local business interface for the Seam bean + * component. +#end $service.getDocumentation(" * ") */ +@javax.ejb.Local public interface ${service.serviceLocalInterfaceName} -#if($service.generalization) - extends ${service.generalization.fullyQualifiedName}Local -#end + extends ${service.serviceInterfaceName}#if($service.generalization), ${service.generalization.fullyQualifiedName}Local#end { -#set ($constants = $service.constants) -#if (!$constants.empty) - - // ----------- Accessors For Constants ------------ - -#**##foreach($constant in $constants) -## Only expose the method if it is public. -#* *##if($constant.visibility == "public") - /** - * Get the $attribute.name constant -$constant.getDocumentation(" * ") - */ - public $constant.type.fullyQualifiedName ${constant.getterName}(); - -#* *##end -#**##end -#end -#set ($attributes = $service.filterSeamAttributes(${service.instanceAttributes})) -#if (!$attributes.empty) - - // --------------- Attributes --------------------- - -#**##foreach ($attribute in $attributes) -## Only expose the method to the component interface if it is public. -#* *##if ($attribute.visibility == "public") - /** - * Get the $attribute.name property -$attribute.getDocumentation(" * ") - */ - public $attribute.type.fullyQualifiedName ${attribute.getterName}(); - -#* *##if(!$attribute.readOnly) - /** - * Set the $attribute.name property - * @param value the new value - */ - public void ${attribute.setterName}($attribute.type.fullyQualifiedName value); - -#* *##end -#* *##end -#**##end -#end #set ($operations = $service.businessOperations) #if (!$operations.empty) @@ -68,11 +30,13 @@ ## ## Only expose methods that are not lifecycle callbacks ## Only expose public methods with local view type accessability +## or if the session bean is a Seam component, then expose all methods ## -#* *##if ($operation.viewTypeAbsoluteLocal) +#* *##if ($operation.viewTypeAbsoluteLocal || $service.seamComponent) /** $operation.getDocumentation(" * ") */ +#* *##if ($operation.visibility == "public") #* *##set ($returnType = $operation.returnType.fullyQualifiedName) #* *##if ($operation.exceptionsPresent) public $returnType $operation.signature @@ -80,14 +44,9 @@ #* *##else public $returnType $operation.signature; #* *##end +#* *##end #* *##end #**##end #end -#if ($service.stateful) - - // ------------ Lifecycle Methods ----------------- - - public void destroy(); -#end } \ No newline at end of file 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionInterface.vsl Index: SessionInterface.vsl =================================================================== // license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: SessionInterface.vsl in andromda-ejb3-cartridge. // #if ($stringUtils.isNotBlank($service.packageName)) package $service.packageName; #end #set ($generatedFile = "${stringUtils.replace($service.fullyQualifiedServiceInterfaceName,'.','/')}.java") /** * Parent interface for the ${service.serviceName} session bean which is * extended by Local and Remote business interfaces. Contains constant * and attribute accessor method definitions. */ public interface ${service.serviceInterfaceName} #if($service.generalization) extends ${service.generalization.fullyQualifiedServiceInterfaceName} #end { #set ($constants = $service.constants) #if (!$constants.empty) // ----------- Accessors For Constants ------------ #**##foreach($constant in $constants) ## Only expose the method if it is public. #* *##if($constant.visibility == "public") /** * Get the $attribute.name constant $constant.getDocumentation(" * ") */ public $constant.type.fullyQualifiedName ${constant.getterName}(); #* *##end #**##end #end #set ($attributes = $service.filterSeamAttributes(${service.instanceAttributes})) #if (!$attributes.empty) // --------------- Attributes --------------------- #**##foreach ($attribute in $attributes) ## Only expose the method to the component interface if it is public. #* *##if ($attribute.visibility == "public") /** * Get the $attribute.name property $attribute.getDocumentation(" * ") */ public $attribute.type.fullyQualifiedName ${attribute.getterName}(); #* *##if(!$attribute.readOnly) /** * Set the $attribute.name property * @param value the new value */ public void ${attribute.setterName}($attribute.type.fullyQualifiedName value); #* *##end #* *##end #**##end #end #if ($service.stateful) // ------------ Lifecycle Methods ----------------- public void destroy(); #end } 1.6 +317 -264 cartridges/andromda-ejb3/src/test/uml/EJB3CartridgeTestModel.xml.zip <<Binary file>> 1.18 +19 -17 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionOperationFacadeLogicImpl.java Index: EJB3SessionOperationFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionOperationFacadeLogicImpl.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -r1.17 -r1.18 --- EJB3SessionOperationFacadeLogicImpl.java 4 Feb 2007 02:45:06 -0000 1.17 +++ EJB3SessionOperationFacadeLogicImpl.java 16 Apr 2007 14:09:40 -0000 1.18 @@ -258,6 +258,8 @@ /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionOperationFacadeLogic#handleGetTransactionType() + * + * If no method level transaction type specified, take it from the class level if it exists there. */ protected String handleGetTransactionType() { @@ -268,8 +270,8 @@ } else { - transType = StringUtils.trimToEmpty( - ObjectUtils.toString(this.getConfiguredProperty(EJB3Globals.TRANSACTION_TYPE))); + EJB3SessionFacade session = (EJB3SessionFacade)this.getOwner(); + transType = session.getTransactionType(); } return transType; } @@ -700,13 +702,13 @@ String value = (String) this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_BIJECTION_FACTORY_VALUE); if(StringUtils.isNotBlank(value)) { - parameters.add("\"" + value + "\""); + parameters.add("value = \"" + value + "\""); } String scope = (String) this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_BIJECTION_FACTORY_SCOPE_TYPE); if(StringUtils.isNotBlank(scope)) { - parameters.add("scope=" + scope); + parameters.add("scope = org.jboss.seam.ScopeType." + scope); } return EJB3MetafacadeUtils.buildAnnotationParameters(parameters); @@ -735,7 +737,7 @@ String flushMode = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_CONVERSATION_BEGIN_FLUSH_MODE); if(StringUtils.isNotBlank(flushMode)) { - parameters.add("flushMode=FlushModeType." + flushMode); + parameters.add("flushMode = org.jboss.seam.annotations.FlushModeType." + flushMode); } String pageflow = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_CONVERSATION_BEGIN_PAGEFLOW); @@ -789,7 +791,7 @@ EJB3Profile.TAGGEDVALUE_SEAM_CONVERSATION_BEGIN_TASK_FLUSH_MODE); if(StringUtils.isNotBlank(flushMode)) { - parameters.add("flushMode=\"" + flushMode + "\""); + parameters.add("flushMode = org.jboss.seam.annotations.FlushModeType." + flushMode + "\""); } String taskIdParameter = (String)this.findTaggedValue( @@ -950,7 +952,7 @@ EJB3Profile.TAGGEDVALUE_SEAM_CONVERSATION_START_TASK_FLUSH_MODE); if (StringUtils.isNotBlank(flushMode)) { - parameters.add("flushMode=" + flushMode); + parameters.add("flushMode = org.jboss.seam.annotations.FlushModeType." + flushMode); } String taskIdParameter = (String)this.findTaggedValue( 1.4 +12 -12 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionAttributeFacadeLogicImpl.java Index: EJB3SessionAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionAttributeFacadeLogicImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- EJB3SessionAttributeFacadeLogicImpl.java 17 Jan 2007 00:50:55 -0000 1.3 +++ EJB3SessionAttributeFacadeLogicImpl.java 16 Apr 2007 14:09:40 -0000 1.4 @@ -108,7 +108,7 @@ String scope = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_BIJECTION_OUT_SCOPE_TYPE, true); if(StringUtils.isNotBlank(scope)) { - parameters.add("scope=\"" + scope + "\""); + parameters.add("scope = org.jboss.seam.ScopeType." + scope); } String value = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_BIJECTION_OUT_VALUE, true); @@ -155,7 +155,7 @@ String scope = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_DATA_DATAMODEL_SCOPE_TYPE, true); if(StringUtils.isNotBlank(scope)) { - parameters.add("scope=\"" + scope + "\""); + parameters.add("scope = org.jboss.seam.ScopeType." + scope); } return EJB3MetafacadeUtils.buildAnnotationParameters(parameters); 1.10 +15 -3 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MetafacadeUtils.java Index: EJB3MetafacadeUtils.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MetafacadeUtils.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- EJB3MetafacadeUtils.java 1 Feb 2007 14:32:10 -0000 1.9 +++ EJB3MetafacadeUtils.java 16 Apr 2007 14:09:41 -0000 1.10 @@ -366,13 +366,25 @@ * If the Classifier is an entity or stateful session bean, then returns CONVERSATION * * @param classifier The classifier to lookup the scope type tagged value - * @paam stateful Whether the classifier is a stateful session bean + * @paam stateless Whether the classifier is a stateless session bean * @return The scope type as a String */ static String getSeamComponentScopeType(ClassifierFacade classifier, boolean stateless) { ExceptionUtils.checkNull("classifer", classifier); - return (String)classifier.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_SCOPE_TYPE); + String scopeType = (String)classifier.findTaggedValue(EJB3Profile.TAGGEDVALUE_SEAM_SCOPE_TYPE); + if (StringUtils.isBlank(scopeType)) + { + if (stateless) + { + scopeType = EJB3Globals.SEAM_COMPONENT_SCOPE_STATELESS; + } + else + { + scopeType = EJB3Globals.SEAM_COMPONENT_SCOPE_CONVERSATION; + } + } + return scopeType; } /** 1.22 +31 -4 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java Index: EJB3SessionFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -r1.21 -r1.22 --- EJB3SessionFacadeLogicImpl.java 11 Feb 2007 14:06:37 -0000 1.21 +++ EJB3SessionFacadeLogicImpl.java 16 Apr 2007 14:09:41 -0000 1.22 @@ -40,6 +40,11 @@ public static final String SERVICE_NAME_PATTERN = "serviceNamePattern"; /** + * The property which stores the pattern defining the service bean parent interface name. + */ + public static final String SERVICE_INTERFACE_NAME_PATTERN = "serviceInterfaceNamePattern"; + + /** * The property which stores the pattern defining the service bean local interface name. */ public static final String SERVICE_LOCAL_INTERFACE_NAME_PATTERN = "serviceLocalInterfaceNamePattern"; @@ -483,8 +488,7 @@ */ protected java.lang.String handleGetTransactionType() { - return EJB3MetafacadeUtils.getTransactionType(this, - String.valueOf(this.getConfiguredProperty(EJB3Globals.TRANSACTION_TYPE))); + return EJB3MetafacadeUtils.getTransactionType(this, null); } /** @@ -535,6 +539,19 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacadeLogic#handleGetServiceInterfaceName() + */ + protected String handleGetServiceInterfaceName() + { + String serviceInterfaceNamePattern = + (String)this.getConfiguredProperty(SERVICE_INTERFACE_NAME_PATTERN); + + return MessageFormat.format( + serviceInterfaceNamePattern, + new Object[] {StringUtils.trimToEmpty(this.getName())}); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacadeLogic#handleGetServiceLocalInterfaceName() */ protected String handleGetServiceLocalInterfaceName() @@ -660,6 +677,17 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacadeLogic#handleGetFullyQualifiedServiceInterfaceName() + */ + protected String handleGetFullyQualifiedServiceInterfaceName() + { + return EJB3MetafacadeUtils.getFullyQualifiedName( + this.getPackageName(), + this.getServiceInterfaceName(), + null); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacadeLogic#handleGetFullyQualifiedServiceLocalInterfaceName() */ protected String handleGetFullyQualifiedServiceLocalInterfaceName() @@ -1342,5 +1370,4 @@ { return this.hasStereotype(EJB3Profile.STEREOTYPE_SEAM_TRANSACTION_TRANSACTIONAL); } - } \ No newline at end of file 1.7 +836 -790 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip <<Binary file>> 1.9 +12 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/ejb-jar.xml.vsl Index: ejb-jar.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/ejb-jar.xml.vsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- ejb-jar.xml.vsl 1 Dec 2006 02:52:22 -0000 1.8 +++ ejb-jar.xml.vsl 16 Apr 2007 14:09:42 -0000 1.9 @@ -19,7 +19,10 @@ ]]> </description> <ejb-name>${service.serviceName}</ejb-name> -#**##if ($service.viewTypeRemote) +## +## Only define the remote business interface if the bean is NOT a Seam component +## +#**##if ($service.viewTypeRemote && !$service.seamComponent) <remote>${service.fullyQualifiedServiceRemoteInterfaceName}</remote> #**##end #**##if ($service.viewTypeLocal) @@ -140,7 +143,15 @@ #end </enterprise-beans> +#if (${seamEnabled} == 'true') + <interceptors> + <interceptor> + <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> + </interceptor> + </interceptors> + +#end <assembly-descriptor> #foreach ($interceptor in $interceptors) ## 1.5 +2 -5 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/persistence.xml.vsl Index: persistence.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/persistence.xml.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- persistence.xml.vsl 13 Feb 2007 02:41:40 -0000 1.4 +++ persistence.xml.vsl 16 Apr 2007 14:09:43 -0000 1.5 @@ -3,17 +3,14 @@ Attention: Generated code! Do not modify by hand! Generated by: persistence.xml.vsl in andromda-ejb3-cartridge. --> -<persistence> - -<!-- <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> ---> <persistence-unit name="${entityManagerName}"> + <provider>org.hibernate.ejb.HibernatePersistence</provider> #if ($stringUtils.isNotBlank(${dataSource})) <jta-data-source>${dataSource}</jta-data-source> #end 1.38 +32 -2 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -u -w -r1.37 -r1.38 --- cartridge.xml 17 Feb 2007 14:09:08 -0000 1.37 +++ cartridge.xml 16 Apr 2007 14:09:43 -0000 1.38 @@ -175,6 +175,19 @@ </template> <template + path="templates/ejb3/SessionInterface.vsl" + outputPattern="$generatedFile" + outlet="session-beans" + overwrite="true" + generateEmptyFiles="true"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacade"/> + </modelElement> + </modelElements> + </template> + + <template path="templates/ejb3/SessionLocal.vsl" outputPattern="$generatedFile" outlet="session-beans" @@ -438,6 +451,23 @@ </template> <template + path="templates/ejb3/config/jboss/components.xml.vsl" + outputPattern="META-INF/components.xml" + outlet="session-config" + overwrite="true" + outputToSingleFile="true" + outputOnEmptyElements="false"> + <modelElements> + <modelElement variable="services"> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacade"/> + </modelElement> + <modelElement variable="entities"> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacade"/> + </modelElement> + </modelElements> + </template> + + <template path="templates/ejb3/config/jboss/login-config.xml.vsl" outputPattern="$generatedFile" outlet="application-metainf" 1.32 +1 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml Index: metafacades.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -r1.31 -r1.32 --- metafacades.xml 18 Feb 2007 10:40:41 -0000 1.31 +++ metafacades.xml 16 Apr 2007 14:09:43 -0000 1.32 @@ -10,6 +10,7 @@ <property reference="labelCollectionNamePattern"/> <property reference="labelSingleNamePattern"/> <property reference="serviceNamePattern"/> + <property reference="serviceInterfaceNamePattern"/> <property reference="serviceLocalInterfaceNamePattern"/> <property reference="serviceRemoteInterfaceName"/> <property reference="serviceImplementationNamePattern"/> 1.38 +8 -1 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -u -w -r1.37 -r1.38 --- namespace.xml 18 Feb 2007 10:40:41 -0000 1.37 +++ namespace.xml 16 Apr 2007 14:09:43 -0000 1.38 @@ -463,6 +463,13 @@ "Bean". </documentation> </property> + <property name="serviceInterfaceNamePattern"> + <default>{0}</default> + <documentation> + The pattern to use when constructing the service + bean parent interface name. + </documentation> + </property> <property name="serviceLocalInterfaceNamePattern"> <default>{0}Local</default> <documentation> @@ -1221,7 +1228,7 @@ <li>NEVER</li> </ul> <strong>NOTE:</strong> - Can be overridden on a per entity basis with the + Can be overridden on a per bean/bean operation basis with the <a href="profile.html#@andromda_ejb_transaction_type"> @andromda.ejb.transaction.type 1.4 +8 -5 cartridges/andromda-ejb3/src/site/axdoc/howto6.xml Index: howto6.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto6.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- howto6.xml 24 Jan 2007 08:56:20 -0000 1.3 +++ howto6.xml 16 Apr 2007 14:09:47 -0000 1.4 @@ -34,10 +34,13 @@ entity's implementation class (they are considered to be business operations). </p> <p> - The documentation discussing the modeling of queries in UML is found here: - <a href="../andromda-ocl-query-library/modeling.html">Query Translation-Library Modeling</a>. + The documentation discussing the modelling of queries in OCL is found on the AndroMDA main + project in <a href="http://galaxy.andromda.org/docs/andromda-translation-libraries/index.html"> + Translation Libraries</a> and + <a href="http://galaxy.andromda.org/docs/andromda-translation-libraries/andromda-ocl-translation-libraries/andromda-ocl-query-library/modeling.html"> + Query Translation Library Modelling</a>. The tagged value overriding queries using EJB QL directly is found here: - <a href="../profile.html#@andromda_ejb_query">@andromda.ejb.query</a>. + <a href="http://galaxy.andromda.org/docs/andromda-ejb-cartridge/profile.html#@andromda_ejb_query">@andromda.ejb.query</a>. </p> <p> <img src="images/org/andromda/test/6/a/uml.gif"/> @@ -138,7 +141,7 @@ <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> + <version>3.2.0.ga</version> <scope>provided</scope> </dependency> ... @@ -163,7 +166,7 @@ </p> <p> You can then model a <i>Classifier</i> scoped operation in your Entity such that you can - over-write the implementation in the DAOImpl (DAP implementation) and use the session object to + over-write the implementation in the DAOImpl (DAO implementation) and use the session object to create the criteria and perform the query. </p> <p> 1.13 +42 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- changes.xml 26 Mar 2007 12:01:05 -0000 1.12 +++ changes.xml 16 Apr 2007 14:09:48 -0000 1.13 @@ -398,6 +398,48 @@ mapped superclass or specializes another entity. This also cleaned up the constructor implementation in the inheriting entity. </action> + <action dev="vancek" type="fix"> + If transaction type specified on the class level and not on the method level, do not generate the + @TransactionAttribute on the method. Similarly, if not modelled on the class level, do not generate it there. + It doesn't make sense to have this annotation at the class level of the parent bean as class level annotations + are not inherited. + </action> + <action dev="vancek" type="update"> + Remove handleDestroy abstract method in SessionBeanBase. This was not being called correctly by + Seam. + </action> + <action dev="vancek" type="update"> + Session bean base or super classes now extend a super interface. Local and remote business interfaces + extend this super interface. Session bean implementations now extend the business interface(s). + This does introduce manual modification when refactoring a session bean's business interface. + The super interface contains common constants and attribute mutator definitions. + </action> + <action dev="vancek" type="update"> + Update persistence.xml descriptor with schema and namespace attributes. + Added provider org.hibernate.ejb.HibernatePersistence property. + </action> + <action dev="vancek" type="add"> + Expand on JBoss Seam support. Move Entity and Session bean Seam component declaration to newly added + components.xml. + This means removing @org.jboss.seam.annotations.Name and @org.jboss.seam.annotations.Scope annotations. + Only specify the @org.hibernate.validator.NotNull annotation on identifier attributes in entity Seam pojos + if identifer is explicity modelled and explicity defined as not null. + The ejb-jar.xml descriptor will NOT allow remote business interface declaration where the session bean + is a Seam component. + Add interceptors definition to ejb-jar.xml for the SeamInterceptor. + </action> + <action dev="vancek" type="update"> + By default, if a Seam component does not have it's scopte type specified, then the default stateless + scope type is assigned to stateless session beans and a conversation scope type is specified for all + other types of beans. + </action> + <action dev="vancek" type="fix"> + Specify the full package path for ScopeType and FlushModeType where the scope + or the flushMode parameters are required in Seam annotations. + </action> + <action dev="vancek" type="fix"> + Fix URLs in howto6.xml for referencing main AndroMDA project. + </action> </release> </body> </document> \ No newline at end of file 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/jboss/components.xml.vsl Index: components.xml.vsl =================================================================== #parse("templates/ejb3/common/JNDIMacros.vm") <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd"> #foreach ($service in $services) #**##if ($service.seamComponent) #localJndiName($service true) <component name="${service.seamComponentName}" class="${service.fullyQualifiedServiceName}" scope="${service.seamComponentScopeType}" jndi-name="${jndiName}"/> #**##end #end #foreach ($entity in $entities) #**##if ($entity.seamComponent) <component name="${entity.seamComponentName}" class="${entity.fullyQualifiedEntityName}" scope="${entity.seamComponentScopeType}"/> #**##end #end <!-- seam-components merge-point --> </components> 1.53 +284 -262 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2007-05-07 13:32:33
|
User: vancek Date: 07/05/07 06:32:34 Modified: andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3OperationFacadeLogicImpl.java andromda-ejb3/src/test/expected cartridge-output.zip andromda-ejb3/src/site/axdoc howto9.xml andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Added: andromda-ejb3/src/site/axdoc namespace.xml profile.xml Log: jira ejb-53 - remove embeddable when explicitly defining mapped superclass Revision Changes Path 1.17 +7 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -r1.16 -r1.17 --- changes.xml 29 Apr 2007 13:45:06 -0000 1.16 +++ changes.xml 7 May 2007 13:32:30 -0000 1.17 @@ -462,6 +462,13 @@ To add more than one cascade property, simply comma separate the types when setting the value of the @andromda.hibernate.cascade tagged value. </action> + <action dev="vancek" due-to="khwalk" type="fix"> + JIRA EJB-53 - When a modelled entity with a MappedSuperclass stereotype has an association to another + entity, the association definition in this other entity is incorrectly named. The resolution is to + avoid appending Embeddable to the mapped superclass and don't apply a naming pattern when a mapped superclass + is explicity modelled. It is fine to apply this naming pattern when this is not explicitly modelled and + instance scoped operations exist on the entity and a mapped superclass is generated. + </action> </release> </body> </document> \ No newline at end of file 1.7 +19 -3 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3OperationFacadeLogicImpl.java Index: EJB3OperationFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3OperationFacadeLogicImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- EJB3OperationFacadeLogicImpl.java 11 Aug 2006 05:49:46 -0000 1.6 +++ EJB3OperationFacadeLogicImpl.java 7 May 2007 13:32:30 -0000 1.7 @@ -30,9 +30,9 @@ */ protected boolean handleIsBusinessOperation() { - return !this.hasStereotype(EJB3Profile.STEREOTYPE_CREATE_METHOD) && - !this.hasStereotype(EJB3Profile.STEREOTYPE_FINDER_METHOD) && - !this.hasStereotype(EJB3Profile.STEREOTYPE_SELECT_METHOD); + return !this.isCreateMethod() && + !this.isFinderMethod() && + !this.isSelectMethod(); } /** @@ -44,6 +44,22 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3OperationFacadeLogic#handleIsCreateMethod() + */ + protected boolean handleIsCreateMethod() + { + return this.hasStereotype(EJB3Profile.STEREOTYPE_CREATE_METHOD); + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3OperationFacadeLogic#handleIsFinderMethod() + */ + protected boolean handleIsFinderMethod() + { + return this.hasStereotype(EJB3Profile.STEREOTYPE_FINDER_METHOD) || this.isQuery(); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3OperationFacadeLogic#handleIsPrePersist() */ protected boolean handleIsPrePersist() 1.9 +44 -41 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip <<Binary file>> 1.5 +53 -38 cartridges/andromda-ejb3/src/site/axdoc/howto9.xml Index: howto9.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto9.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- howto9.xml 17 Feb 2007 14:09:09 -0000 1.4 +++ howto9.xml 7 May 2007 13:32:32 -0000 1.5 @@ -30,9 +30,9 @@ <subsection name="Non Interhiting Entities"> <p> In a mapped superclass scenario, an entity inherits from a superclass that has persistent state - and mapping information, but the super class isn't an entity and is not mapped to a relation table. + and mapping information, but the super class is NOT an entity and is not mapped to a relation table. This is the strategy employed by the EJB3 cartridge when generating non-inheriting entities if - <code>instance</code> scoped operations are modelled on the entity. + <code>instance</code> scoped operations exist on the entity. </p> <p> A mapped superclass is generated containing @@ -41,16 +41,47 @@ and relationship mapping information exists in the mapped superclass. The mapped superclass is regenerated on every run, however the subclass is not. </p> + <p class="highlight"> + Until we declare entity pojos via orm.xml instead of annotations, the inheriting subclass + in the latter scenario will require manual modifications if you change certain metamodel + tags. + </p> </subsection> <a name="Mapped_Superclasses"/> <subsection name="Mapped Superclasses"> <p> - To explicity defined an entity as a mapped superclass, model the - <![CDATA[<<MappedSuperclass>>]]> stereotype on the root entity. + To explicity define an entity as a mapped superclass, model the + <![CDATA[<<MappedSuperclass>>]]> stereotype on the root entity. In the past, you had to + model the <![CDATA[<<Entity>>]]> stereotype as well on this class, but this is no longer + necessary if you are using the latest cartridge source. + </p> + <p class="highlight"> + If you do not want to model the <![CDATA[<<Entity>>]]> stereotype as well - in theory, a mapped + superclass is NOT an entity and it doesn't make sense for this stereotype to exist - you must + also disable the following two constraints in your <code>andromda.xml</code> by adding the following + <b>constraints</b> section. Rest assured that by disabling these constraints, your are not + vulnerable to modelling flaws, since the constraints that exist on the <i>EJB3EntityFacade</i> will + enforce these constraints. +<source language="xml"><![CDATA[ + <repository name="netBeansMDR"> + <models> + <model> + <uri>${model.uri}</uri> + <moduleSearchLocations> + <location patterns="**/*.xml.zip">${settings.localRepository}/org/andromda/profiles/</location> + </moduleSearchLocations> + <constraints enforceAll="true"> + <constraint enforce="false">org::andromda::metafacades::uml::Entity::entities can only generalize other entities</constraint> + <constraint enforce="false">org::andromda::metafacades::uml::Entity::entity must have at least one primary key</constraint> + </constraints> + </model> + </models> + </repository> +]]></source> </p> <p class="highlight"> - You must explicity define your identifiers either in the mapped superclass or in the inheriting - subclass entities. + In this case, you must explicity define your identifiers either in the mapped superclass or in + the inheriting subclass entity. </p> <p> The following is an example of this type of inheritance where the <code>Vehicle</code> mapped @@ -68,7 +99,7 @@ </p> <p> <ul> - <li class="gen"><a class="changed" href="howto/org/andromda/test/howto9/a/VehicleEmbeddable.java"><code>VehicleEmbeddable.java</code></a></li> + <li class="gen"><a class="changed" href="howto/org/andromda/test/howto9/a/Vehicle.java"><code>Vehicle.java</code></a></li> <li class="gen"><a class="changed" href="howto/org/andromda/test/howto9/a/CarEmbeddable.java"><code>CarEmbeddable.java</code></a></li> <li class="impl"><a class="changed" href="howto/org/andromda/test/howto9/a/Car.java"><code>Car.java</code></a></li> <li class="gen"><a href="howto/org/andromda/test/howto9/a/CarType.java"><code>CarType.java</code></a></li> @@ -91,45 +122,29 @@ </ul> </p> <p> - It's worthwhile to note that only a <code>VehicleEmbeddable</code> class is generated which - contains all the mapping information. + It's worthwhile to note that only a <code>Vehicle</code> class is generated which + contains all the mapping information. In this case, because the <code>Vehicle</code> class + was explicitly defined as a mapped superclass, the naming pattern does NOT append + <code>Embeddable</code> to the class name. This class is regenerated every time AndroMDA runs; any manual changes to this - class is overwritten. + class will be overwritten. </p> <p> - A <code>CarEmbeddable</code> mapped superclass with all mapping information - is generated and a <code>Car</code> implementation entity classes. Remember that this only happens - if the entity contains <code>instance</code> scoped operations. + The process also generates a <code>CarEmbeddable</code> mapped superclass, containing all + mapping information, along with an extending <code>Car</code> implementation entity class. + Remember that this only happens if the entity contains <code>instance</code> scoped operations. + The naming pattern here dictates that <code>Embeddable</code> is appended to the mapped superclass. + Remember this is NOT the case when you explicitly define the a mapped superclass. </p> <p> - The the Person entity operates under the normal EJB3 cartridge + The Person entity operates under normal EJB3 cartridge guidelines since there is no inheritance hierarchy for this entity. Therefore, only a - <code>Person</code> class is generated and should not be modified. + <code>Person</code> class is generated and should not be modified since it will be overwritten + during the next build. </p> - <p> + <p class="highlight"> If you are going to enable manageable entities, you must ONLY enable - your identifiers in the subclass and not the parent mapped superclass. Furthermore, you must - also disable - the following two constraints in your <code>andromda.xml</code> by adding the following - <b>constraints</b> section. Rest assured that by disabling these constraints, your are not - vulnerable to modelling flaws, since the constraints on the <i>EJB3EntityFacade</i> will - enforce these constraints. -<source language="xml"><![CDATA[ - <repository name="netBeansMDR"> - <models> - <model> - <uri>${model.uri}</uri> - <moduleSearchLocations> - <location patterns="**/*.xml.zip">${settings.localRepository}/org/andromda/profiles/</location> - </moduleSearchLocations> - <constraints enforceAll="true"> - <constraint enforce="false">org::andromda::metafacades::uml::Entity::entities can only generalize other entities</constraint> - <constraint enforce="false">org::andromda::metafacades::uml::Entity::entity must have at least one primary key</constraint> - </constraints> - </model> - </models> - </repository> -]]></source> + your identifiers in the subclass and not the parent mapped superclass. </p> </subsection> <a name="Single_Table_Strategy"/> 1.1 cartridges/andromda-ejb3/src/site/axdoc/namespace.xml Index: namespace.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <document><properties><title>AndroMDA EJB3 Cartridge Namespace</title></properties><body> <section name="AndroMDA EJB3 Cartridge Namespace Components"><ul> <li>cartridge</li> <li>metafacades</li> <li>profile</li> </ul></section> <section name="AndroMDA EJB3 Cartridge Namespace Properties"><div class="namespacePropertyGroup"><a name="Cache" class="namespacePropertyGroup">Cache</a><ul><li><a href="#hibernateAssociationCache" title="Optional, defaults to 'TRANSACTIONAL'">hibernateAssociationCache</a></li><li><a href="#hibernateCacheProvider" title="Optional, no default value available">hibernateCacheProvider</a></li><li><a href="#hibernateEnableAssociationsCache" title="Optional, defaults to 'false'">hibernateEnableAssociationsCache</a></li><li><a href="#hibernateEnableCache" title="Optional, defaults to 'false'">hibernateEnableCache</a></li><li><a href="#hibernateEntityCache" title="Optional, defaults to 'TRANSACTIONAL'">hibernateEntityCache</a></li><li><a href="#hibernateTreecacheMbeanObject" title="Optional, no default value available">hibernateTreecacheMbeanObject</a></li><li><a href="#hibernateUseQueryCache" title="Optional, defaults to 'false'">hibernateUseQueryCache</a></li><li><a href="#useDefaultCacheRegion" title="Optional, defaults to 'false'">useDefaultCacheRegion</a></li></ul></div><div class="namespacePropertyGroup"><a name="Clustering" class="namespacePropertyGroup">Clustering</a><ul><li><a href="#enableClustering" title="Optional, defaults to 'false'">enableClustering</a></li></ul></div><div class="namespacePropertyGroup"><a name="DAO Properties" class="namespacePropertyGroup">DAO Properties</a><ul><li><a href="#daoBaseNamePattern" title="Optional, defaults to '{0}DaoBase'">daoBaseNamePattern</a></li><li><a href="#daoDefaultExceptionNamePattern" title="Optional, defaults to '{0}DaoException'">daoDefaultExceptionNamePattern</a></li><li><a href="#daoImplementationNamePattern" title="Optional, defaults to '{0}DaoImpl'">daoImplementationNamePattern</a></li><li><a href="#daoInheritanceEnabled" title="Optional, defaults to 'false'">daoInheritanceEnabled</a></li><li><a href="#daoNamePattern" title="Optional, defaults to '{0}Dao'">daoNamePattern</a></li><li><a href="#enableDaoPropertiesCreateMethod" title="Optional, defaults to 'true'">enableDaoPropertiesCreateMethod</a></li></ul></div><div class="namespacePropertyGroup"><a name="Entity Properties" class="namespacePropertyGroup">Entity Properties</a><ul><li><a href="#entityAggregationCascade" title="Optional, no default value available">entityAggregationCascade</a></li><li><a href="#entityCompositeCascade" title="Optional, no default value available">entityCompositeCascade</a></li><li><a href="#entityDefaultCascade" title="Optional, defaults to 'NONE'">entityDefaultCascade</a></li><li><a href="#entityDefaultEnumLiteralColumnLength" title="Optional, defaults to '20'">entityDefaultEnumLiteralColumnLength</a></li><li><a href="#entityDefaultGeneratorAllocationSize" title="Optional, defaults to '1'">entityDefaultGeneratorAllocationSize</a></li><li><a href="#entityDefaultGeneratorInitialValue" title="Optional, defaults to '1'">entityDefaultGeneratorInitialValue</a></li><li><a href="#entityDefaultGeneratorType" title="Optional, defaults to 'AUTO'">entityDefaultGeneratorType</a></li><li><a href="#entityDefaultTemporalType" title="Optional, defaults to 'TIMESTAMP'">entityDefaultTemporalType</a></li><li><a href="#entityDiscriminatorColumnName" title="Optional, defaults to 'TYPE'">entityDiscriminatorColumnName</a></li><li><a href="#entityDiscriminatorType" title="Optional, defaults to 'STRING'">entityDiscriminatorType</a></li><li><a href="#entityGenericFinders" title="Optional, defaults to 'true'">entityGenericFinders</a></li><li><a href="#entityInheritanceStrategy" title="Optional, defaults to 'SINGLE_TABLE'">entityInheritanceStrategy</a></li><li><a href="#entityViewType" title="Optional, defaults to 'local'">entityViewType</a></li></ul></div><div class="namespacePropertyGroup"><a name="JDBC" class="namespacePropertyGroup">JDBC</a><ul><li><a href="#connectionUrl" title="Optional, no default value available">connectionUrl</a></li><li><a href="#dataSource" title="Optional, no default value available">dataSource</a></li><li><a href="#dataSourceName" title="Optional, no default value available">dataSourceName</a></li><li><a href="#driver" title="Optional, no default value available">driver</a></li><li><a href="#entityManagerJTADataSource" title="Optional, defaults to 'java:/DefaultDS'">entityManagerJTADataSource</a></li><li><a href="#entityManagerName" title="Optional, no default value available">entityManagerName</a></li><li><a href="#hibernateDialect" title="Optional, defaults to 'org.hibernate.dialect.MySQLDialect'">hibernateDialect</a></li><li><a href="#hibernateHbm2DDLAuto" title="Optional, defaults to 'update'">hibernateHbm2DDLAuto</a></li><li><a href="#hibernateJdbcBatchSize" title="Optional, no default value available">hibernateJdbcBatchSize</a></li><li><a href="#hibernateJdbcFetchSize" title="Optional, no default value available">hibernateJdbcFetchSize</a></li><li><a href="#hibernateJdbcUseScrollableResultSet" title="Optional, no default value available">hibernateJdbcUseScrollableResultSet</a></li><li><a href="#hibernateJdbcUseStreamsForBinary" title="Optional, no default value available">hibernateJdbcUseStreamsForBinary</a></li><li><a href="#hibernateMaxFetchDepth" title="Optional, no default value available">hibernateMaxFetchDepth</a></li><li><a href="#hibernateShowSql" title="Optional, no default value available">hibernateShowSql</a></li><li><a href="#jarFiles" title="Optional, no default value available">jarFiles</a></li><li><a href="#password" title="Optional, no default value available">password</a></li><li><a href="#username" title="Optional, no default value available">username</a></li></ul></div><div class="namespacePropertyGroup"><a name="MDB Properties" class="namespacePropertyGroup">MDB Properties</a><ul><li><a href="#messageDrivenDestinationType" title="Optional, defaults to 'javax.jms.Queue'">messageDrivenDestinationType</a></li><li><a href="#messageDrivenTopicSubscriptionDurability" title="Optional, defaults to 'NonDurable'">messageDrivenTopicSubscriptionDurability</a></li></ul></div><div class="namespacePropertyGroup"><a name="Name Patterns" class="namespacePropertyGroup">Name Patterns</a><ul><li><a href="#defaultServiceExceptionNamePattern" title="Optional, defaults to '{0}Exception'">defaultServiceExceptionNamePattern</a></li><li><a href="#embeddedValueImplementationNamePattern" title="Optional, defaults to '{0}Impl'">embeddedValueImplementationNamePattern</a></li><li><a href="#entityCompositePrimaryKeyNamePattern" title="Optional, defaults to '{0}PK'">entityCompositePrimaryKeyNamePattern</a></li><li><a href="#entityEmbeddableNamePattern" title="Optional, defaults to '{0}Embeddable'">entityEmbeddableNamePattern</a></li><li><a href="#entityImplementationNamePattern" title="Optional, defaults to '{0}Impl'">entityImplementationNamePattern</a></li><li><a href="#entityListenerNamePattern" title="Optional, defaults to '{0}Listener'">entityListenerNamePattern</a></li><li><a href="#entityNamePattern" title="Optional, defaults to '{0}'">entityNamePattern</a></li><li><a href="#implementationOperationNamePattern" title="Optional, defaults to 'handle{0}'">implementationOperationNamePattern</a></li><li><a href="#interceptorNamePattern" title="Optional, defaults to '{0}'">interceptorNamePattern</a></li><li><a href="#jndiNamePrefix" title="Optional, no default value available">jndiNamePrefix</a></li><li><a href="#labelCollectionNamePattern" title="Optional, defaults to '{0}Labels'">labelCollectionNamePattern</a></li><li><a href="#labelSingleNamePattern" title="Optional, defaults to '{0}Label'">labelSingleNamePattern</a></li><li><a href="#manageableCreateExceptionNamePattern" title="Optional, defaults to '{0}CreateManageableException'">manageableCreateExceptionNamePattern</a></li><li><a href="#manageableDeleteExceptionNamePattern" title="Optional, defaults to '{0}DeleteManageableException'">manageableDeleteExceptionNamePattern</a></li><li><a href="#manageableReadExceptionNamePattern" title="Optional, defaults to '{0}ReadManageableException'">manageableReadExceptionNamePattern</a></li><li><a href="#manageableServiceBaseNamePattern" title="Optional, defaults to '{0}Base'">manageableServiceBaseNamePattern</a></li><li><a href="#manageableUpdateExceptionNamePattern" title="Optional, defaults to '{0}UpdateManageableException'">manageableUpdateExceptionNamePattern</a></li><li><a href="#messageDrivenDurableSubscriptionIdPattern" title="Optional, defaults to '{0}SubscriptionId'">messageDrivenDurableSubscriptionIdPattern</a></li><li><a href="#messageDrivenImplementationNamePattern" title="Optional, defaults to '{0}MDBBeanImpl'">messageDrivenImplementationNamePattern</a></li><li><a href="#messageDrivenListenerNamePattern" title="Optional, defaults to '{0}Listener'">messageDrivenListenerNamePattern</a></li><li><a href="#messageDrivenNamePattern" title="Optional, defaults to '{0}MDBBean'">messageDrivenNamePattern</a></li><li><a href="#messageDrivenTestNamePattern" title="Optional, defaults to '{0}Test'">messageDrivenTestNamePattern</a></li><li><a href="#messageDrivenTestPackageNamePattern" title="Optional, defaults to '{0}.test'">messageDrivenTestPackageNamePattern</a></li><li><a href="#serviceBaseNamePattern" title="Optional, defaults to '{0}Base'">serviceBaseNamePattern</a></li><li><a href="#serviceDelegateNamePattern" title="Optional, defaults to '{0}Delegate'">serviceDelegateNamePattern</a></li><li><a href="#serviceImplementationNamePattern" title="Optional, defaults to '{0}BeanImpl'">serviceImplementationNamePattern</a></li><li><a href="#serviceInterfaceNamePattern" title="Optional, defaults to '{0}'">serviceInterfaceNamePattern</a></li><li><a href="#serviceListenerNamePattern" title="Optional, defaults to '{0}Listener'">serviceListenerNamePattern</a></li><li><a href="#serviceLocalInterfaceNamePattern" title="Optional, defaults to '{0}Local'">serviceLocalInterfaceNamePattern</a></li><li><a href="#serviceNamePattern" title="Optional, defaults to '{0}Bean'">serviceNamePattern</a></li><li><a href="#serviceOperationTestNamePattern" title="Optional, defaults to 'test{0}'">serviceOperationTestNamePattern</a></li><li><a href="#serviceRemoteInterfaceName" title="Optional, defaults to '{0}Remote'">serviceRemoteInterfaceName</a></li><li><a href="#serviceTestNamePattern" title="Optional, defaults to '{0}Test'">serviceTestNamePattern</a></li><li><a href="#serviceTestPackageNamePattern" title="Optional, defaults to '{0}.test'">serviceTestPackageNamePattern</a></li><li><a href="#webServiceInterfaceNamePattern" title="Optional, defaults to '{0}WSInterface'">webServiceInterfaceNamePattern</a></li></ul></div><div class="namespacePropertyGroup"><a name="Other Properties" class="namespacePropertyGroup">Other Properties</a><ul><li><a href="#allowDefaultServiceException" title="Optional, defaults to 'true'">allowDefaultServiceException</a></li><li><a href="#associationCollectionType" title="Optional, defaults to 'set'">associationCollectionType</a></li><li><a href="#associationEndCollectionIndexName" title="Optional, no default value available">associationEndCollectionIndexName</a></li><li><a href="#associationEndCollectionIndexType" title="Optional, defaults to 'datatype::String'">associationEndCollectionIndexType</a></li><li><a href="#compositionDefinesEagerLoading" title="Optional, defaults to 'true'">compositionDefinesEagerLoading</a></li><li><a href="#defaultCollectionInterface" title="Optional, defaults to 'java.util.Set'">defaultCollectionInterface</a></li><li><a href="#ejb3TypeMappingsUri" title="Optional, defaults to 'Hibernate'">ejb3TypeMappingsUri</a></li><li><a href="#ejb3TypesPackage" title="Optional, defaults to 'org.andromda.ejb3'">ejb3TypesPackage</a></li><li><a href="#javaTypeConversionIgnoreList" title="Optional, no default value available">javaTypeConversionIgnoreList</a></li><li><a href="#listTypeImplementation" title="Optional, defaults to 'java.util.ArrayList'">listTypeImplementation</a></li><li><a href="#manageableServiceLocatorName" title="Optional, defaults to 'ManageableServiceLocator'">manageableServiceLocatorName</a></li><li><a href="#mapTypeImplementation" title="Optional, defaults to 'java.util.HashMap'">mapTypeImplementation</a></li><li><a href="#parameterRequiredCheck" title="Optional, defaults to 'true'">parameterRequiredCheck</a></li><li><a href="#persistenceContainerName" title="Optional, defaults to 'jboss'">persistenceContainerName</a></li><li><a href="#persistenceContextUnitName" title="Optional, no default value available">persistenceContextUnitName</a></li><li><a href="#persistenceProviderExtensions" title="Optional, defaults to 'none'">persistenceProviderExtensions</a></li><li><a href="#queryUseNamedParameters" title="Optional, defaults to 'true'">queryUseNamedParameters</a></li><li><a href="#seamEnabled" title="Optional, defaults to 'false'">seamEnabled</a></li><li><a href="#setTypeImplementation" title="Optional, defaults to 'java.util.TreeSet'">setTypeImplementation</a></li><li><a href="#specificCollectionInterfaces" title="Optional, defaults to 'false'">specificCollectionInterfaces</a></li><li><a href="#transactionType" title="Optional, defaults to 'REQUIRED'">transactionType</a></li><li><a href="#valueObjectName" title="Optional, defaults to '{0}'">valueObjectName</a></li><li><a href="#valueObjectPackage" title="Optional, defaults to '{0}'">valueObjectPackage</a></li><li><a href="#xmlEncoding" title="Optional, defaults to 'UTF-8'">xmlEncoding</a></li></ul></div><div class="namespacePropertyGroup"><a name="Outlet Properties" class="namespacePropertyGroup">Outlet Properties</a><div class="namespacePropertyGroupDocumentation"><documentation> Defines the locations to which output is generated. </documentation></div><ul><li><a href="#application-config" title="Required">application-config</a></li><li><a href="#application-metainf" title="Required">application-metainf</a></li><li><a href="#commons" title="Required">commons</a></li><li><a href="#dao-impls" title="Required">dao-impls</a></li><li><a href="#daos" title="Required">daos</a></li><li><a href="#entity-beans" title="Required">entity-beans</a></li><li><a href="#entity-config" title="Required">entity-config</a></li><li><a href="#entity-impls" title="Required">entity-impls</a></li><li><a href="#message-driven-beans" title="Required">message-driven-beans</a></li><li><a href="#message-driven-impls" title="Required">message-driven-impls</a></li><li><a href="#services" title="Required">services</a></li><li><a href="#session-beans" title="Required">session-beans</a></li><li><a href="#session-config" title="Required">session-config</a></li><li><a href="#session-impls" title="Required">session-impls</a></li><li><a href="#test-config" title="Required">test-config</a></li><li><a href="#test-impls" title="Required">test-impls</a></li><li><a href="#tests" title="Required">tests</a></li><li><a href="#user-types" title="Required">user-types</a></li></ul></div><div class="namespacePropertyGroup"><a name="Security Properties" class="namespacePropertyGroup">Security Properties</a><ul><li><a href="#manageableRolesAllowed" title="Optional, defaults to 'Admin'">manageableRolesAllowed</a></li><li><a href="#securityRealm" title="Optional, no default value available">securityRealm</a></li></ul></div><div class="namespacePropertyGroup"><a name="Service Properties" class="namespacePropertyGroup">Service Properties</a><ul><li><a href="#serviceLocatorName" title="Optional, defaults to 'ServiceLocator'">serviceLocatorName</a></li><li><a href="#serviceViewType" title="Optional, defaults to 'remote'">serviceViewType</a></li></ul></div><div class="namespacePropertyGroup"><a name="Transactions" class="namespacePropertyGroup">Transactions</a><ul><li><a href="#hibernateTransactionAutoCloseSession" title="Optional, no default value available">hibernateTransactionAutoCloseSession</a></li><li><a href="#hibernateTransactionFlushBeforeCompletion" title="Optional, no default value available">hibernateTransactionFlushBeforeCompletion</a></li><li><a href="#hibernateTransactionManagerLookupClass" title="Optional, no default value available">hibernateTransactionManagerLookupClass</a></li></ul></div><div class="namespacePropertyGroup"><a name="WebService Properties" class="namespacePropertyGroup">WebService Properties</a><ul><li><a href="#webServiceContextRoot" title="Required">webServiceContextRoot</a></li><li><a href="#webServiceDefaultParameterStyle" title="Optional, defaults to 'wrapped'">webServiceDefaultParameterStyle</a></li><li><a href="#webServiceDefaultStyle" title="Optional, defaults to 'rpc'">webServiceDefaultStyle</a></li><li><a href="#webServiceDefaultUse" title="Optional, defaults to 'literal'">webServiceDefaultUse</a></li><li><a href="#webServiceEnabled" title="Required">webServiceEnabled</a></li><li><a href="#webServiceNamespacePattern" title="Optional, defaults to 'http://{0}/{1}'">webServiceNamespacePattern</a></li><li><a href="#webServiceQualifiedNameLocalPartPattern" title="Optional, defaults to '{0}'">webServiceQualifiedNameLocalPartPattern</a></li><li><a href="#webServiceReverseNamespace" title="Optional, defaults to 'false'">webServiceReverseNamespace</a></li><li><a href="#webServiceUrlPattern" title="Required">webServiceUrlPattern</a></li></ul></div><p> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="services" class="namespacePropertyTitle">services</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location to which all service classes (including the service locator(s)) will be generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="entity-beans" class="namespacePropertyTitle">entity-beans</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which Entity POJOs are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="entity-impls" class="namespacePropertyTitle">entity-impls</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location to which Entity POJO implementation files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="entity-config" class="namespacePropertyTitle">entity-config</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where the persistence XML descriptor is generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="session-beans" class="namespacePropertyTitle">session-beans</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which Session Bean files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="session-impls" class="namespacePropertyTitle">session-impls</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which Session Bean implementation files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="session-config" class="namespacePropertyTitle">session-config</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where the ejb-jar.xml XML descriptor is generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="daos" class="namespacePropertyTitle">daos</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location to which EJB3 DAOs, and any support classes are generated. <p> Please <strong>NOTE</strong> that the dao implementation classes will also be generated to this location when <strong>no operations</strong> are present on the entity with <em>classifier scope</em>. </p> </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="dao-impls" class="namespacePropertyTitle">dao-impls</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location to which EJB3 DAO implementation classes will be generated (if there are any classifier scoped business operations modeled on any entity). <p> Please <strong>NOTE</strong> that the dao implementation classes will be generated to the <em>daos</em> outlet when <strong>no operations</strong> are present on the entity with <em>classifier scope</em>. </p> </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="application-config" class="namespacePropertyTitle">application-config</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where the application specific XML descriptors are generated. i.e the application login-config.xml descriptor. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="application-metainf" class="namespacePropertyTitle">application-metainf</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where the application specific XML descriptors that are packaged in the ear file are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="message-driven-beans" class="namespacePropertyTitle">message-driven-beans</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which Message Driven Bean files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="message-driven-impls" class="namespacePropertyTitle">message-driven-impls</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which Message Driven Bean implementation files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="commons" class="namespacePropertyTitle">commons</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The directory to which common classes for session beans, entity POJOs or MDB are generated </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="user-types" class="namespacePropertyTitle">user-types</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location to which user-types such as enumeration are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="test-config" class="namespacePropertyTitle">test-config</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where the JBoss Embedded/Microcontainer configuration files are generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="tests" class="namespacePropertyTitle">tests</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where auto generated session bean test classes are generated. These are typically the helper classes which are re-generated. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="test-impls" class="namespacePropertyTitle">test-impls</a><a href="#Outlet Properties" title="Go to Outlet Properties namespace element group">(Back to Outlet Properties)</a></td></tr><tr><td><div class="required">Required property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The location where manual session bean test classes are generated. These will not be regenerated and require user intervention. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="entityManagerName" class="namespacePropertyTitle">entityManagerName</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The name assigned to the entity manager. If no name is specified, the name of the containing persistence archive without the .par extension is used. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="entityManagerJTADataSource" class="namespacePropertyTitle">entityManagerJTADataSource</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> Default value: <code class="defaultValue">java:/DefaultDS</code></td></tr><tr><td class="documentation" colspan="2"><documentation> Specifies the global JNDI name of the JTA data source. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateHbm2DDLAuto" class="namespacePropertyTitle">hibernateHbm2DDLAuto</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> Default value: <code class="defaultValue">update</code></td></tr><tr><td class="documentation" colspan="2"><documentation> Automatically export schema DDL to the database when deployed. With create-drop, the database schema will be dropped when the entity is undeployed. Permitted values are: <ul> <li>update</li> <li>create</li> <li>create-drop</li> <li>none</li> </ul> </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateDialect" class="namespacePropertyTitle">hibernateDialect</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> Default value: <code class="defaultValue">org.hibernate.dialect.MySQLDialect</code></td></tr><tr><td class="documentation" colspan="2"><documentation> The SQL dialect of the database. <ul> <li>org.hibernate.dialect.MySQLDialect</li> <li>org.hibernate.dialect.MySQLInnoDBDialect</li> <li>org.hibernate.dialect.MySQLMyISAMDialect</li> <li>org.hibernate.dialect.HSQLDialect</li> <li>org.hibernate.dialect.PostgreSQLDialect</li> <li>org.hibernate.dialect.DB2Dialect</li> <li>org.hibernate.dialect.OracleDialect</li> <li>org.hibernate.dialect.Oracle9Dialect</li> <li>org.hibernate.dialect.SybaseDialect</li> <li>org.hibernate.dialect.SQLServerDialect</li> <li>org.hibernate.dialect.SAPDBDialect</li> <li>org.hibernate.dialect.InformixDialect</li> <li>org.hibernate.dialect.IngresDialect</li> <li>org.hibernate.dialect.ProgressDialect</li> <li>org.hibernate.dialect.InterbaseDialect</li> <li>org.hibernate.dialect.PointbaseDialect</li> <li>org.hibernate.dialect.FrontbaseDialect</li> <li>org.hibernate.dialect.FirebirdDialect</li> </ul> </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateShowSql" class="namespacePropertyTitle">hibernateShowSql</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Whether or not to log SQL statements. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateMaxFetchDepth" class="namespacePropertyTitle">hibernateMaxFetchDepth</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Sets a maximum "depth" for the outer join fetch tree. Recommended values between 0 and 3 </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateJdbcFetchSize" class="namespacePropertyTitle">hibernateJdbcFetchSize</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> A non-zero value determines the JDBC fetch size </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateJdbcBatchSize" class="namespacePropertyTitle">hibernateJdbcBatchSize</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> A nonzero value enables use of JDBC2 batch updates by Hibernate. Recommended values between 5 and 30 </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateJdbcUseScrollableResultSet" class="namespacePropertyTitle">hibernateJdbcUseScrollableResultSet</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Whether or not to enable use of JDBC2 scrollable resultsets by Hibernate. This property is only necessary when using user supplied connections. Hibernate uses connection metadata otherwise. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateJdbcUseStreamsForBinary" class="namespacePropertyTitle">hibernateJdbcUseStreamsForBinary</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Whether or not to use streams when writing / reading binary or serializable types to/from JDBC. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="jarFiles" class="namespacePropertyTitle">jarFiles</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The comma separated ejb jars that are included in the deployed ear package. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="driver" class="namespacePropertyTitle">driver</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> JDBC Driver to make a database connection. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="username" class="namespacePropertyTitle">username</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The database user login name. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="password" class="namespacePropertyTitle">password</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The database user password. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="connectionUrl" class="namespacePropertyTitle">connectionUrl</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> URL for the JDBC Driver to make the connection to the database. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="dataSource" class="namespacePropertyTitle">dataSource</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Full JNDI name of data source to use. (would be used instead of the connection properties, driver, username, password, etc). </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="dataSourceName" class="namespacePropertyTitle">dataSourceName</a><a href="#JDBC" title="Go to JDBC namespace element group">(Back to JDBC)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> The JNDI name of data source to use without prefix like java:/. </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateCacheProvider" class="namespacePropertyTitle">hibernateCacheProvider</a><a href="#Cache" title="Go to Cache namespace element group">(Back to Cache)</a></td></tr><tr><td><div class="optional">Optional property</div></td><td> No default value available </td></tr><tr><td class="documentation" colspan="2"><documentation> Defines Hibernate Cache Provider implementation class. Possible values for JBoss4/Hibernate are: <ul> <li>org.hibernate.cache.HashtableCacheProvider</li> <li>org.jboss.ejb3.entity.TreeCacheProviderHook</li> </ul> </documentation></td></tr></table></div> <div class="namespaceProperty"><table class="bodyTable"><tr class="a"><td class="namespacePropertyTitle" colspan="2"><a name="hibernateTreecacheMbeanObject" class="namespacePropertyTitle">hibernateTreecacheMbeanObject</a><a href="#Cache" title="Go to Cache namespace element group">(Back to Cache)</a></td></tr><tr><td><... [truncated message content] |