Batch Files

Listings C.48 C.50 are the batch files meant to compile the source code present in the directories ejb_components_src and web_components_src, and finally put the deployables into the deployable_components directory. Execute the batch files in the order of their listing.

Listing C.48 compile_ejb_components.cmd
 rem ############################################################################# rem                   Name of file:compile_ejb_components rem               COMPILING AND CREATING JAR FILE FOR EJB APPLICATION rem ############################################################################# set WEBLOGIC_DOMAIN=C:\bea\user_domains\mvc_app_domain set DEVELOP_DIR=C:\MVC_Application set EJB_DIR=%DEVELOP_DIR%\ejb_components_src set DEPLOY_DIR=%DEVELOP_DIR%\deployable_components call %WEBLOGIC_DOMAIN%\setEnv set CLASSPATH=%CLASSPATH%;%EJB_DIR%;%WEB_DIR% cd %EJB_DIR% rem ##### creating the deploy directory to create the deployable structure rem       within this ##### mkdir deploy cd deploy rem ##### creating the deploy_jars directory to put the intermediate deployable rem       jar into this ##### mkdir deploy_jars rem ### creating the META-INF directory to place the xml files within this ### mkdir META-INF rem ### copying the xml files into the META-INF directory ## copy %EJB_DIR%\*.xml .\META-INF rem ### compiling the java files into the deploy directory ### javac -d %EJB_DIR%\deploy %EJB_DIR%\*.java cd %EJB_DIR%\deploy rem ### creating the intermediate jar file and copying into the META-INF rem       directory ### jar cv0f TempEJBApp.jar META-INF/ com copy TempEJBApp.jar %EJB_DIR%\deploy\deploy_jars rem ### creating the final EJB deployable and copying into deployable_ rem    components directory### cd %EJB_DIR%\deploy\deploy_jars java weblogic.ejbc -keepgenerated TempEJBApp.jar AirlinesEJBApp.jar copy AirlinesEJBApp.jar %DEPLOY_DIR% 
Listing C.49 compile_web_components.cmd
 rem ############################################################################# rem                   Name of file:compile_web_components rem            COMPILING AND CREATING WAR FILE FOR WEB APPLICATION rem ############################################################################# set WEBLOGIC_DOMAIN=C:\bea\user_domains\mvc_app_domain set DEVELOP_DIR=C:\MVC_Application set WEB_DIR=%DEVELOP_DIR%\web_components_src set DEPLOY_DIR=%DEVELOP_DIR%\deployable_components set EJB_DIR=%DEVELOP_DIR%\ejb_components_src call %WEBLOGIC_DOMAIN%\setEnv set CLASSPATH=%CLASSPATH%;%EJB_DIR%\deploy; rem ##### creating the deploy directory to put in the deployable structure. rem       Then adding jsp files into it ##### cd %WEB_DIR% mkdir deploy cd %WEB_DIR%\deploy copy %WEB_DIR%\*.jsp . rem ##### creating images directory and putting all image files into it ##### cd %WEB_DIR%\deploy mkdir images cd images copy %WEB_DIR%\*.jpg . rem ##### creating WEB-INF directory and copying all the xml and jsp files rem       into this directory ##### cd %WEB_DIR%\deploy mkdir WEB-INF cd WEB-INF copy %WEB_DIR%\*.xml . rem ##### creating the lib directory to put in the tld files ##### cd %WEB_DIR%\deploy\WEB-INF mkdir lib cd lib copy %WEB_DIR%\weblogic-tags.tld . rem ##### creating classes directory and compiling all the java code into it ##### cd %WEB_DIR%\deploy\WEB-INF mkdir classes cd classes javac -d . %WEB_DIR%\*.java rem ##### creating deployable war file ##### cd %WEB_DIR%\deploy jar -cv0f AirlinesWebApp.war . rem ##### copying the deployable war file into the deployable_ rem       components directory##### copy AirlinesWebApp.war %DEPLOY_DIR% 
Listing C.50 create_deployable_ear.cmd
 rem ############################################################################# rem                  Name of file:create_deployable_ear rem            COMPILING AND CREATING JAR FILE FOR EJB APPLICATION rem ############################################################################# set WEBLOGIC_DOMAIN=C:\bea\user_domains\mvc_app_domain set DEVELOP_DIR=C:\MVC_Application set EJB_DIR=%DEVELOP_DIR%\ejb_components_src set DEPLOY_DIR=%DEVELOP_DIR%\deployable_components call %WEBLOGIC_DOMAIN%\setEnv rem ##### creating the final deployable application file ##### cd %DEPLOY_DIR% jar -cv0f AirlinesApp.ear . 


Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net