diff --git a/WHATSNEW b/WHATSNEW index 74822ea64..f1077d5bb 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -93,6 +93,12 @@ Other changes: -------------- * New optional type, added. +* now allows control over which additional classes and interfaces + are added to the generated EJB jars. A new attribute "dependency" can be + defines which classes are added. The addition of classes now uses + the Jakarta-BCEL library rather than reflection, meaning bean classes are + no longer loaded into Ant's JVM. + * has a new attribute named ignoreSystemClasses. * New task generates an XML report of changes that occur diff --git a/docs/manual/OptionalTasks/ejb.html b/docs/manual/OptionalTasks/ejb.html index 63e06d334..152ce12d7 100644 --- a/docs/manual/OptionalTasks/ejb.html +++ b/docs/manual/OptionalTasks/ejb.html @@ -634,6 +634,37 @@ beans in the jar.

+ +

Dependencies

+

In addition to the bean classes, ejbjar is able to ad additional classes to the generated +ejbjar. These classes are typically the support classes which are used by the bean's classes or as +parameters to the bean's methods.

+ +

In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the super +classes and super interfaces of the bean classes. For this technique to work the bean +classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies. +

+ +

The ejbjar task in Ant 1.5 uses the jakarta-BCEL library to analyze the bean's class +files directly, rather than loading them into the JVM. This also allows ejbjar to add all +of the required support classes for a bean and not just super classes. +

+ +

In Ant 1.5, a new attribute, dependency has been introduced to allow the +buildfile to control what additional classes are added to the generated jar. It takes three +possible values

+
    +
  • none - only the bean classes and interfaces described in the bean's +descriptor are added to the jar.
  • +
  • super - this is the default value and replicates the original ejbjar +behaviour where super classes and super interfaces are added to the jar
  • +
  • full - In this mode all classes used by the bean's classes and interfaces +are added to the jar
  • +
+

The super and full values require the jakarta-BCEL library +to be available. If it is not, ejbjar will drop back to the behaviour corresponding to +the value none.

+

Parameters:

@@ -725,6 +756,13 @@ beans in the jar. within the descriptor dir hierarchy. + + + + +
No.
dependencyThis attribute controls which additional classes and interfaces + are added to the jar. Please refer to the description + aboveNo.

Nested Elements