Java Doc for WebsphereDeploymentTool.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.WebsphereDeploymentTool

WebsphereDeploymentTool
public class WebsphereDeploymentTool extends GenericDeploymentTool (Code)
Websphere deployment tool that augments the ejbjar task. Searches for the websphere specific deployment descriptors and adds them to the final ejb jar file. Websphere has two specific descriptors for session beans:
  • ibm-ejb-jar-bnd.xmi
  • ibm-ejb-jar-ext.xmi
and another two for container managed entity beans:
  • Map.mapxmi
  • Schema.dbxmi
In terms of WebSphere, the generation of container code and stubs is called deployment. This step can be performed by the websphere element as part of the jar generation process. If the switch ejbdeploy is on, the ejbdeploy tool from the websphere toolset is called for every ejb-jar. Unfortunately, this step only works, if you use the ibm jdk. Otherwise, the rmic (called by ejbdeploy) throws a ClassFormatError. Be sure to switch ejbdeploy off, if run ant with sun jdk.


Field Summary
final public static  StringPUBLICID_EJB11
    
final public static  StringPUBLICID_EJB20
    
final protected static  StringSCHEMA_DIR
    
final protected static  StringWAS_BND
    
final protected static  StringWAS_CMP_MAP
    
final protected static  StringWAS_CMP_SCHEMA
    
final protected static  StringWAS_EXT
    


Method Summary
protected  voidaddVendorFiles(Hashtable ejbFiles, String baseName)
     Add any vendor specific files which should be included in the EJB Jar.
public  PathcreateWASClasspath()
     Get the classpath to the websphere 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.
protected  DescriptorHandlergetDescriptorHandler(File srcDir)
     .
protected  StringgetOptions()
    
 FilegetVendorOutputJarFile(String baseName)
     Get the vendor specific name of the Jar that will be output.
protected  DescriptorHandlergetWebsphereDescriptorHandler(File srcDir)
     Get a description handler.
Parameters:
  srcDir - the source directory.
protected  booleanisRebuildRequired(File genericJarFile, File websphereJarFile)
     Helper method to check to see if a websphere EBJ1.1 jar needs to be rebuilt using ejbdeploy.
public  voidsetCodegen(boolean codegen)
    
public  voidsetDbname(String dbName)
     Sets the name of the Database to create; optional.
public  voidsetDbschema(String dbSchema)
     Sets the name of the schema to create; optional.
public  voidsetDbvendor(String dbvendor)
     Sets the DB Vendor for the Entity Bean mapping ; optional.
public  voidsetEJBdtd(String inString)
     Setter used to store the location of the Sun's Generic EJB DTD.
public  voidsetEjbdeploy(boolean ejbdeploy)
     Decide, wether ejbdeploy should be called or not; optional, default true.
public  voidsetKeepgeneric(boolean inValue)
     This controls whether the generic file used as input to ejbdeploy is retained; optional, default false.
public  voidsetNewCMP(boolean newCMP)
     Set the value of the newCMP scheme.
public  voidsetNoinform(boolean noinform)
     Flag to disable informational messages; optional, default false.
public  voidsetNovalidate(boolean novalidate)
     Flag to disable the validation steps; optional, default false.
public  voidsetNowarn(boolean nowarn)
     Flag to disable warning and informational messages; optional, default false.
public  voidsetOldCMP(boolean oldCMP)
     Set the value of the oldCMP scheme.
public  voidsetQuiet(boolean quiet)
     Flag, default true, to only output error messages.
public  voidsetRebuild(boolean rebuild)
     Set the rebuild flag to false to only update changes in the jar rather than rerunning ejbdeploy; optional, default true.
public  voidsetRmicoptions(String options)
     Set the rmic options.
public  voidsetSuffix(String inString)
     String value appended to the basename of the deployment descriptor to create the filename of the WebLogic EJB jar file.
public  voidsetTempdir(String tempdir)
     The directory, where ejbdeploy will write temporary files; optional, defaults to '_ejbdeploy_temp'.
public  voidsetTrace(boolean trace)
     Flag to enable internal tracing when set, optional, default false.
public  voidsetUse35(boolean attr)
     Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false.
public  voidsetWASClasspath(Path wasClasspath)
     Set the websphere classpath.
public  voidvalidateConfigured()
     Called to validate that the tool parameters have been configured.
protected  voidwriteJar(String baseName, File jarFile, Hashtable files, String publicId)
     .

Field Detail
PUBLICID_EJB11
final public static String PUBLICID_EJB11(Code)
ID for ejb 1.1



PUBLICID_EJB20
final public static String PUBLICID_EJB20(Code)
ID for ejb 2.0



SCHEMA_DIR
final protected static String SCHEMA_DIR(Code)
Schema directory



WAS_BND
final protected static String WAS_BND(Code)



WAS_CMP_MAP
final protected static String WAS_CMP_MAP(Code)



WAS_CMP_SCHEMA
final protected static String WAS_CMP_SCHEMA(Code)



WAS_EXT
final protected static String WAS_EXT(Code)





Method Detail
addVendorFiles
protected void addVendorFiles(Hashtable ejbFiles, String baseName)(Code)
Add any vendor specific files which should be included in the EJB Jar.
Parameters:
  ejbFiles - a hashtable entryname -> file.
Parameters:
  baseName - a prefix to use.



createWASClasspath
public Path createWASClasspath()(Code)
Get the classpath to the websphere classpaths. the websphere classpath.



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. a classloader for the jar file.
throws:
  IOException - if there is an error.



getDescriptorHandler
protected DescriptorHandler getDescriptorHandler(File srcDir)(Code)
.



getOptions
protected String getOptions()(Code)
Gets the options for the EJB Deploy operation String



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.



getWebsphereDescriptorHandler
protected DescriptorHandler getWebsphereDescriptorHandler(File srcDir)(Code)
Get a description handler.
Parameters:
  srcDir - the source directory. the handler.



isRebuildRequired
protected boolean isRebuildRequired(File genericJarFile, File websphereJarFile)(Code)
Helper method to check to see if a websphere EBJ1.1 jar needs to be rebuilt using ejbdeploy. 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 websphere jar needs to be regened with ejbdeploy. This allows faster build times for working developers.

The way websphere ejbdeploy 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 websphere 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 ejbdeploy. 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 websphere jar gets rebuilt if the xml files change at all.
Parameters:
  genericJarFile - java.io.File The generic jar file.
Parameters:
  websphereJarFile - java.io.File The websphere jar file to check tosee if it needs to be rebuilt. true if a rebuild is required.




setCodegen
public void setCodegen(boolean codegen)(Code)
Flag, default false, to only generate the deployment code, do not run RMIC or Javac
Parameters:
  codegen - option



setDbname
public void setDbname(String dbName)(Code)
Sets the name of the Database to create; optional.
Parameters:
  dbName - name of the database



setDbschema
public void setDbschema(String dbSchema)(Code)
Sets the name of the schema to create; optional.
Parameters:
  dbSchema - name of the schema



setDbvendor
public void setDbvendor(String dbvendor)(Code)
Sets the DB Vendor for the Entity Bean mapping ; optional.

Valid options can be obtained by running the following command: <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help

This is also used to determine the name of the Map.mapxmi and Schema.dbxmi files, for example Account-DB2UDB_V81-Map.mapxmi and Account-DB2UDB_V81-Schema.dbxmi.


Parameters:
  dbvendor - database vendor type



setEJBdtd
public void setEJBdtd(String inString)(Code)
Setter used to store the location of the Sun's Generic EJB DTD. This can be a file on the system or a resource on the classpath.
Parameters:
  inString - the string to use as the DTD location.



setEjbdeploy
public void setEjbdeploy(boolean ejbdeploy)(Code)
Decide, wether ejbdeploy should be called or not; optional, default true.
Parameters:
  ejbdeploy - a boolean value.



setKeepgeneric
public void setKeepgeneric(boolean inValue)(Code)
This controls whether the generic file used as input to ejbdeploy is retained; optional, default false.
Parameters:
  inValue - either 'true' or 'false'.



setNewCMP
public void setNewCMP(boolean newCMP)(Code)
Set the value of the newCMP scheme. The old CMP scheme locates the websphere CMP descriptor based on the naming convention where the websphere 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 websphere EJB descriptor. Also, descriptors which contain multiple CMP references could not be used.
Parameters:
  newCMP - a boolean value.



setNoinform
public void setNoinform(boolean noinform)(Code)
Flag to disable informational messages; optional, default false.
Parameters:
  noinform - if true disables informational messages



setNovalidate
public void setNovalidate(boolean novalidate)(Code)
Flag to disable the validation steps; optional, default false.
Parameters:
  novalidate - option



setNowarn
public void setNowarn(boolean nowarn)(Code)
Flag to disable warning and informational messages; optional, default false.
Parameters:
  nowarn - option



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.



setQuiet
public void setQuiet(boolean quiet)(Code)
Flag, default true, to only output error messages.
Parameters:
  quiet - option



setRebuild
public void setRebuild(boolean rebuild)(Code)
Set the rebuild flag to false to only update changes in the jar rather than rerunning ejbdeploy; optional, default true.
Parameters:
  rebuild - a boolean value.



setRmicoptions
public void setRmicoptions(String options)(Code)
Set the rmic options.
Parameters:
  options - the options to use.



setSuffix
public void setSuffix(String inString)(Code)
String value appended to the basename of the deployment descriptor to create the filename of the WebLogic EJB jar file. Optional, default '.jar'.
Parameters:
  inString - the string to use as the suffix.



setTempdir
public void setTempdir(String tempdir)(Code)
The directory, where ejbdeploy will write temporary files; optional, defaults to '_ejbdeploy_temp'.
Parameters:
  tempdir - the directory name to use.



setTrace
public void setTrace(boolean trace)(Code)
Flag to enable internal tracing when set, optional, default false.
Parameters:
  trace - a boolean vaule.



setUse35
public void setUse35(boolean attr)(Code)
Flag to use the WebSphere 3.5 compatible mapping rules ; optional, default false.
Parameters:
  attr - a boolean value.



setWASClasspath
public void setWASClasspath(Path wasClasspath)(Code)
Set the websphere classpath.
Parameters:
  wasClasspath - the websphere classpath.



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)
.



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)

w_ww_.___j___ava_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.