Java Doc for WeblogicDeploymentTool.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » ejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs.optional.ejb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
      org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool

All known Subclasses:   org.apache.tools.ant.taskdefs.optional.ejb.WeblogicTOPLinkDeploymentTool,
WeblogicDeploymentTool
public class WeblogicDeploymentTool extends GenericDeploymentTool (Code)
The weblogic element is used to control the weblogic.ejbc compiler for generating weblogic EJB jars. Prior to Ant 1.3, the method of locating CMP descriptors was to use the ejbjar naming convention. So if your ejb-jar was called, Customer-ejb-jar.xml, your weblogic descriptor was called Customer- weblogic-ejb-jar.xml and your CMP descriptor had to be Customer-weblogic-cmp- rdbms-jar.xml. In addition, the <type-storage> element in the weblogic descriptor had to be set to the standard name META-INF/weblogic-cmp-rdbms- jar.xml, as that is where the CMP descriptor was mapped to in the generated jar.


Field Summary
final protected static  StringCOMPILER_EJB11
    
final protected static  StringCOMPILER_EJB20
    
final protected static  StringDEFAULT_COMPILER
    
final protected static  StringDEFAULT_WL51_DTD_LOCATION
    
final protected static  StringDEFAULT_WL51_EJB11_DTD_LOCATION
    
final protected static  StringDEFAULT_WL60_51_DTD_LOCATION
    
final protected static  StringDEFAULT_WL60_DTD_LOCATION
    
final protected static  StringDEFAULT_WL60_EJB11_DTD_LOCATION
    
final protected static  StringDEFAULT_WL60_EJB20_DTD_LOCATION
    
final protected static  StringDEFAULT_WL70_DTD_LOCATION
    
final public static  StringPUBLICID_EJB11
    
final public static  StringPUBLICID_EJB20
    
final public static  StringPUBLICID_WEBLOGIC_EJB510
    
final public static  StringPUBLICID_WEBLOGIC_EJB600
    
final public static  StringPUBLICID_WEBLOGIC_EJB700
    
final protected static  StringWL_CMP_DD
    
final protected static  StringWL_DD
    


Method Summary
public  voidaddSysproperty(Environment.Variable sysp)
     Add a nested sysproperty element.
protected  voidaddVendorFiles(Hashtable ejbFiles, String ddPrefix)
     Add any vendor specific files which should be included in the EJB Jar.
public  PathcreateWLClasspath()
     Get the classpath to the weblogic classpaths.
protected  ClassLoadergetClassLoaderFromJar(File classjar)
     Helper method invoked by isRebuildRequired to get a ClassLoader for a Jar File passed to it.
Parameters:
  classjar - java.io.File representing jar file to get classes from.
public  StringgetEjbcClass()
     Get the ejbc compiler class.
public  IntegergetJvmDebugLevel()
     Get the debug level.
 FilegetVendorOutputJarFile(String baseName)
     Get the vendor specific name of the Jar that will be output.
protected  DescriptorHandlergetWeblogicDescriptorHandler(File srcDir)
     Get the weblogic descriptor handler.
Parameters:
  srcDir - the source directory.
protected  booleanisRebuildRequired(File genericJarFile, File weblogicJarFile)
     Helper method to check to see if a weblogic EBJ1.1 jar needs to be rebuilt using ejbc.
protected  voidregisterKnownDTDs(DescriptorHandler handler)
     Register the DTDs.
public  voidsetArgs(String args)
     Any optional extra arguments pass to the weblogic.ejbc tool.
public  voidsetCompiler(String compiler)
     The compiler (switch -compiler) to use; optional. This allows for the selection of a different compiler to be used for the compilation of the generated Java files.
public  voidsetEJBdtd(String inString)
     Deprecated.
public  voidsetEjbcClass(String ejbcClass)
     Set the classname of the ejbc compiler; optional Normally ejbjar determines the appropriate class based on the DTD used for the EJB.
public  voidsetJvmDebugLevel(Integer jvmDebugLevel)
     Sets the weblogic.StdoutSeverityLevel to use when running the JVM that executes ejbc; optional.
public  voidsetJvmargs(String args)
     Set any additional arguments to pass to the weblogic JVM; optional.
public  voidsetKeepgenerated(String inValue)
     Controls whether weblogic will keep the generated Java files used to build the class files added to the jar.
public  voidsetKeepgeneric(boolean inValue)
    
public  voidsetNewCMP(boolean newCMP)
     If this is set to true, the new method for locating CMP descriptors will be used; optional, default false.

The old CMP scheme locates the weblogic CMP descriptor based on the naming convention where the weblogic CMP file is expected to be named with the bean name as the prefix.

public  voidsetNoEJBC(boolean noEJBC)
    
public  voidsetOldCMP(boolean oldCMP)
     Set the value of the oldCMP scheme.
public  voidsetOutputDir(File outputDir)
     If set ejbc will use this directory as the output destination rather than a jar file.
public  voidsetRebuild(boolean rebuild)
     Set the rebuild flag to false to only update changes in the jar rather than rerunning ejbc; optional, default true. This flag controls whether weblogic.ejbc is always invoked to build the jar file.
public  voidsetSuffix(String inString)
     Setter used to store the suffix for the generated weblogic jar file.
public  voidsetWLClasspath(Path wlClasspath)
     Optional classpath to WL6.0.
public  voidsetWLdtd(String inString)
     Deprecated.
public  voidsetWeblogicdtd(String inString)
     Deprecated.
public  voidvalidateConfigured()
     Called to validate that the tool parameters have been configured.
protected  voidwriteJar(String baseName, File jarFile, Hashtable files, String publicId)
     Method used to encapsulate the writing of the JAR file.

Field Detail
COMPILER_EJB11
final protected static String COMPILER_EJB11(Code)



COMPILER_EJB20
final protected static String COMPILER_EJB20(Code)



DEFAULT_COMPILER
final protected static String DEFAULT_COMPILER(Code)



DEFAULT_WL51_DTD_LOCATION
final protected static String DEFAULT_WL51_DTD_LOCATION(Code)



DEFAULT_WL51_EJB11_DTD_LOCATION
final protected static String DEFAULT_WL51_EJB11_DTD_LOCATION(Code)
Weblogic 5.1 dtd location



DEFAULT_WL60_51_DTD_LOCATION
final protected static String DEFAULT_WL60_51_DTD_LOCATION(Code)



DEFAULT_WL60_DTD_LOCATION
final protected static String DEFAULT_WL60_DTD_LOCATION(Code)



DEFAULT_WL60_EJB11_DTD_LOCATION
final protected static String DEFAULT_WL60_EJB11_DTD_LOCATION(Code)
Weblogic 6.0 ejb 1.1 dtd location



DEFAULT_WL60_EJB20_DTD_LOCATION
final protected static String DEFAULT_WL60_EJB20_DTD_LOCATION(Code)
Weblogic 6.0 ejb 2.0 dtd location



DEFAULT_WL70_DTD_LOCATION
final protected static String DEFAULT_WL70_DTD_LOCATION(Code)



PUBLICID_EJB11
final public static String PUBLICID_EJB11(Code)
EJB11 id



PUBLICID_EJB20
final public static String PUBLICID_EJB20(Code)
EJB20 id



PUBLICID_WEBLOGIC_EJB510
final public static String PUBLICID_WEBLOGIC_EJB510(Code)
Weblogic 5.1.0 id



PUBLICID_WEBLOGIC_EJB600
final public static String PUBLICID_WEBLOGIC_EJB600(Code)
Weblogic 6.0.0 id



PUBLICID_WEBLOGIC_EJB700
final public static String PUBLICID_WEBLOGIC_EJB700(Code)
Weblogic 7.0.0 id



WL_CMP_DD
final protected static String WL_CMP_DD(Code)



WL_DD
final protected static String WL_DD(Code)





Method Detail
addSysproperty
public void addSysproperty(Environment.Variable sysp)(Code)
Add a nested sysproperty element.
Parameters:
  sysp - the element to add.



addVendorFiles
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix)(Code)
Add any vendor specific files which should be included in the EJB Jar.
Parameters:
  ejbFiles - the hash table to be populated.
Parameters:
  ddPrefix - the prefix to use.



createWLClasspath
public Path createWLClasspath()(Code)
Get the classpath to the weblogic classpaths. the classpath to configure.



getClassLoaderFromJar
protected ClassLoader getClassLoaderFromJar(File classjar) throws IOException(Code)
Helper method invoked by isRebuildRequired to get a ClassLoader for a Jar File passed to it.
Parameters:
  classjar - java.io.File representing jar file to get classes from. the classloader for the jarfile.
throws:
  IOException - if there is a problem.



getEjbcClass
public String getEjbcClass()(Code)
Get the ejbc compiler class. the name of the ejbc compiler class.



getJvmDebugLevel
public Integer getJvmDebugLevel()(Code)
Get the debug level. the jvm debug level (may be null).



getVendorOutputJarFile
File getVendorOutputJarFile(String baseName)(Code)
Get the vendor specific name of the Jar that will be output. The modification date of this jar will be checked against the dependent bean classes.



getWeblogicDescriptorHandler
protected DescriptorHandler getWeblogicDescriptorHandler(File srcDir)(Code)
Get the weblogic descriptor handler.
Parameters:
  srcDir - the source directory. the descriptor.



isRebuildRequired
protected boolean isRebuildRequired(File genericJarFile, File weblogicJarFile)(Code)
Helper method to check to see if a weblogic EBJ1.1 jar needs to be rebuilt using ejbc. Called from writeJar it sees if the "Bean" classes are the only thing that needs to be updated and either updates the Jar with the Bean classfile or returns true, saying that the whole weblogic jar needs to be regened with ejbc. This allows faster build times for working developers.

The way weblogic ejbc works is it creates wrappers for the publicly defined methods as they are exposed in the remote interface. If the actual bean changes without changing the the method signatures then only the bean classfile needs to be updated and the rest of the weblogic jar file can remain the same. If the Interfaces, ie. the method signatures change or if the xml deployment descriptors changed, the whole jar needs to be rebuilt with ejbc. This is not strictly true for the xml files. If the JNDI name changes then the jar doesnt have to be rebuild, but if the resources references change then it does. At this point the weblogic jar gets rebuilt if the xml files change at all.
Parameters:
  genericJarFile - java.io.File The generic jar file.
Parameters:
  weblogicJarFile - java.io.File The weblogic jar file to check tosee if it needs to be rebuilt. true if the jar needs to be rebuilt.




registerKnownDTDs
protected void registerKnownDTDs(DescriptorHandler handler)(Code)
Register the DTDs.
Parameters:
  handler - the handler to use.



setArgs
public void setArgs(String args)(Code)
Any optional extra arguments pass to the weblogic.ejbc tool.
Parameters:
  args - extra arguments to pass to the ejbc tool.



setCompiler
public void setCompiler(String compiler)(Code)
The compiler (switch -compiler) to use; optional. This allows for the selection of a different compiler to be used for the compilation of the generated Java files. This could be set, for example, to Jikes to compile with the Jikes compiler. If this is not set and the build.compiler property is set to jikes, the Jikes compiler will be used. If this is not desired, the value "default" may be given to use the default compiler.
Parameters:
  compiler - the compiler to be used.



setEJBdtd
public void setEJBdtd(String inString)(Code)
Deprecated. Defines the location of Sun's EJB DTD in the weblogic class hierarchy. Should not be needed, and the nested <dtd> element is recommended when it is.
Parameters:
  inString - the string to use as the DTD location.



setEjbcClass
public void setEjbcClass(String ejbcClass)(Code)
Set the classname of the ejbc compiler; optional Normally ejbjar determines the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler featured in weblogic 6 has, however, been deprecated in version 7. When using with version 7 this attribute should be set to "weblogic.ejbc" to avoid the deprecation warning.
Parameters:
  ejbcClass - the name of the class to use.



setJvmDebugLevel
public void setJvmDebugLevel(Integer jvmDebugLevel)(Code)
Sets the weblogic.StdoutSeverityLevel to use when running the JVM that executes ejbc; optional. Set to 16 to avoid the warnings about EJB Home and Remotes being in the classpath
Parameters:
  jvmDebugLevel - the value to use.



setJvmargs
public void setJvmargs(String args)(Code)
Set any additional arguments to pass to the weblogic JVM; optional.
Parameters:
  args - the arguments to be passed to the JVM



setKeepgenerated
public void setKeepgenerated(String inValue)(Code)
Controls whether weblogic will keep the generated Java files used to build the class files added to the jar. This can be useful when debugging; default is false.
Parameters:
  inValue - either 'true' or 'false'



setKeepgeneric
public void setKeepgeneric(boolean inValue)(Code)
controls whether the generic file used as input to ejbc is retained; defaults to false
Parameters:
  inValue - true for keep generic



setNewCMP
public void setNewCMP(boolean newCMP)(Code)
If this is set to true, the new method for locating CMP descriptors will be used; optional, default false.

The old CMP scheme locates the weblogic CMP descriptor based on the naming convention where the weblogic CMP file is expected to be named with the bean name as the prefix. Under this scheme the name of the CMP descriptor does not match the name actually used in the main weblogic EJB descriptor. Also, descriptors which contain multiple CMP references could not be used.
Parameters:
  newCMP - a boolean value.




setNoEJBC
public void setNoEJBC(boolean noEJBC)(Code)
Do not EJBC the jar after it has been put together; optional, default false
Parameters:
  noEJBC - a boolean value.



setOldCMP
public void setOldCMP(boolean oldCMP)(Code)
Set the value of the oldCMP scheme. This is an antonym for newCMP
Parameters:
  oldCMP - a boolean value.



setOutputDir
public void setOutputDir(File outputDir)(Code)
If set ejbc will use this directory as the output destination rather than a jar file. This allows for the generation of "exploded" jars.
Parameters:
  outputDir - the directory to be used.



setRebuild
public void setRebuild(boolean rebuild)(Code)
Set the rebuild flag to false to only update changes in the jar rather than rerunning ejbc; optional, default true. This flag controls whether weblogic.ejbc is always invoked to build the jar file. In certain circumstances, such as when only a bean class has been changed, the jar can be generated by merely replacing the changed classes and not rerunning ejbc. Setting this to false will reduce the time to run ejbjar.
Parameters:
  rebuild - a boolean value.



setSuffix
public void setSuffix(String inString)(Code)
Setter used to store the suffix for the generated weblogic jar file.
Parameters:
  inString - the string to use as the suffix.



setWLClasspath
public void setWLClasspath(Path wlClasspath)(Code)
Optional classpath to WL6.0. Weblogic 6.0 will give a warning if the home and remote interfaces of a bean are on the system classpath used to run weblogic.ejbc. In that case, the standard weblogic classes should be set with this attribute (or equivalent nested element) and the home and remote interfaces located with the standard classpath attribute.
Parameters:
  wlClasspath - the path to be used.



setWLdtd
public void setWLdtd(String inString)(Code)
Deprecated. Defines the location of weblogic DTD in the weblogic class hierarchy. Should not be needed, and the nested <dtd> element is recommended when it is.
Parameters:
  inString - the string to use as the DTD location.



setWeblogicdtd
public void setWeblogicdtd(String inString)(Code)
Deprecated. Defines the location of the ejb-jar DTD in the weblogic class hierarchy. Should not be needed, and the nested <dtd> element is recommended when it is.
Parameters:
  inString - the string to use as the DTD location.



validateConfigured
public void validateConfigured() throws BuildException(Code)
Called to validate that the tool parameters have been configured.
throws:
  BuildException - if there is an error.



writeJar
protected void writeJar(String baseName, File jarFile, Hashtable files, String publicId) throws BuildException(Code)
Method used to encapsulate the writing of the JAR file. Iterates over the filenames/java.io.Files in the Hashtable stored on the instance variable ejbFiles.
Parameters:
  baseName - the base name.
Parameters:
  jarFile - the jar file to populate.
Parameters:
  files - the hash table of files to write.
Parameters:
  publicId - the id to use.
throws:
  BuildException - if there is a problem.



Fields inherited from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
final public static String ANALYZER_CLASS_FULL(Code)(Java Doc)
final public static String ANALYZER_CLASS_SUPER(Code)(Java Doc)
final public static String ANALYZER_FULL(Code)(Java Doc)
final public static String ANALYZER_NONE(Code)(Java Doc)
final public static String ANALYZER_SUPER(Code)(Java Doc)
final public static String DEFAULT_ANALYZER(Code)(Java Doc)
final public static int DEFAULT_BUFFER_SIZE(Code)(Java Doc)
final protected static String EJB_DD(Code)(Java Doc)
final public static int JAR_COMPRESS_LEVEL(Code)(Java Doc)
final protected static String MANIFEST(Code)(Java Doc)
final protected static String META_DIR(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
protected void addFileToJar(JarOutputStream jStream, File inputFile, String logicalFilename) throws BuildException(Code)(Java Doc)
protected void addSupportClasses(Hashtable ejbFiles)(Code)(Java Doc)
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix)(Code)(Java Doc)
protected void checkAndAddDependants(Hashtable checkEntries) throws BuildException(Code)(Java Doc)
protected void checkConfiguration(String descriptorFileName, SAXParser saxParser) throws BuildException(Code)(Java Doc)
public void configure(EjbJar.Config config)(Code)(Java Doc)
public Path createClasspath()(Code)(Java Doc)
protected ClassLoader getClassLoaderForBuild()(Code)(Java Doc)
protected Path getCombinedClasspath()(Code)(Java Doc)
protected EjbJar.Config getConfig()(Code)(Java Doc)
protected DescriptorHandler getDescriptorHandler(File srcDir)(Code)(Java Doc)
protected File getDestDir()(Code)(Java Doc)
protected String getJarBaseName(String descriptorFileName)(Code)(Java Doc)
protected Location getLocation()(Code)(Java Doc)
protected File getManifestFile(String prefix)(Code)(Java Doc)
protected String getPublicId()(Code)(Java Doc)
protected Task getTask()(Code)(Java Doc)
public String getVendorDDPrefix(String baseName, String descriptorFileName)(Code)(Java Doc)
File getVendorOutputJarFile(String baseName)(Code)(Java Doc)
protected void log(String message, int level)(Code)(Java Doc)
protected boolean needToRebuild(Hashtable ejbFiles, File jarFile)(Code)(Java Doc)
protected Hashtable parseEjbFiles(String descriptorFileName, SAXParser saxParser) throws IOException, SAXException(Code)(Java Doc)
public void processDescriptor(String descriptorFileName, SAXParser saxParser)(Code)(Java Doc)
protected void registerKnownDTDs(DescriptorHandler handler)(Code)(Java Doc)
public void setClasspath(Path classpath)(Code)(Java Doc)
public void setDestdir(File inDir)(Code)(Java Doc)
public void setGenericJarSuffix(String inString)(Code)(Java Doc)
public void setTask(Task task)(Code)(Java Doc)
protected boolean usingBaseJarName()(Code)(Java Doc)
public void validateConfigured() throws BuildException(Code)(Java Doc)
protected void writeJar(String baseName, File jarfile, Hashtable files, String publicId) throws BuildException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

ww__w_.j__av___a_2_s.c_o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.