User: gropi Date: 01/09/02 07:04:28 Modified: src/xdocs/howto howtovisualagedebug.xml Log: Update by Craig Doremus and Chiew Kwooi Lee. Now there are two new files that simplify VAJ integration. Additional information about Tomcat. Revision Changes Path 1.2 +374 -353 manual/src/xdocs/howto/howtovisualagedebug.xml Index: howtovisualagedebug.xml =================================================================== RCS file: /cvsroot/jboss/manual/src/xdocs/howto/howtovisualagedebug.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- howtovisualagedebug.xml 2001/08/29 09:19:37 1.1 +++ howtovisualagedebug.xml 2001/09/02 14:04:28 1.2 @@ -1,353 +1,374 @@ -<!-- DOCTYPE section SYSTEM "D:\cvsroot\manual\src\docs\docbookx\docbookx.dtd" --> -<section id="vajdebug"> - <title> - How to Run and Debug EJBs using jBoss 2.2.2 inside of - Visual Age for Java version 3.5 (patch 2) -</title> - <para> - Author: - <author> - <firstname>Craig</firstname> - <surname>Doremus</surname> - </author> - <email>[EMAIL PROTECTED]</email> - </para> - <para>Importing jBoss into Visual Age for Java (VAJ) allows you to develop and -debug EJBs using the latest Enterprise Java Beans standard (version 1.1 and Message Driven EJBs). -The Enterprise version of Visual Age has built-in EJB debugging, but that -edition of the IDE only supports version 1.0 of the EJB spec. Currently, Visual Age only -supports JDK 1.2.2. -</para> - <para> - We created a jBoss Test Environment by manually importing jBoss source - into Visual Age for Java. This import also - involved a few code hacks to remove JDK 1.3 - code, to change the paths to configiration files and some - modification of paths inside of configuration files. -</para> - <para> - Our jBoss import does not include an integrated - <ulink url="http://jakarta.apache.org/tomcat/index.html">Jakarta-Tomcat</ulink> servlet engine. - IBM provides a Test Environment for Tomcat version 3.1 on their web site (see below) - that allows debugging of JSP and servlets inside of VAJ. Both Tomcat - and jBoss can be run inside of VAJ to provide the ability to debug EJBs - called by servlets. -</para> - <section id="vajdebug-requirements"> - <title>Requirements</title> - <itemizedlist> - <listitem> - <para>Visual Age for Java Professional or Enterprise Edition Version 3.5 with patch 2 installed. Version 3.5.3 has recently been released, but there are some RMI bugs in it so we can't recommend using it at this time.</para> - </listitem> - <listitem> - <para>JBoss-2.2.2.zip downloaded (NOT the one with integrated Tomcat) <ulink url="http://prdownloads.sourceforge.net/jboss/JBoss-2.2.2.zip">Download it here</ulink> - </para> - </listitem> - </itemizedlist> - </section> - <!-- end of vajdebug-requirements section --> - <!-- MANUAL IMPORT SECTION START --> - <section id="vajdebug-manualimport"> - <title>Manually importing jBoss 2.2.2 source code into Visual Age</title> - <orderedlist> - <listitem> - <para>Unzip JBoss-2.2.2.zip into a temporary directory.</para> - </listitem> - <listitem> - <para>Create a jBoss project in VAJ. If jBoss 2.0 is already installed, version it and delete all files and related projects before proceeding with the jBoss 2.2.2 install. - </para> - </listitem> - <listitem> - <para>Import source, jar and class files into VAJ from the temporary directory including:</para> - <orderedlist> - <listitem> - <para>All jBoss source (src subdirectory). - </para> - <para>Source from org.jnp.server from CVS (ver 1.2). Change org.jboss.naming.NamingService in the source distribution to CVS ver 1.9 to maintain compatibility with this class.</para> - <para>Source for org.jbossmq.* from CVS</para> - </listitem> - <listitem> - <para>In lib or lib/ext directory import the class files: </para> - <programlisting> - All files from minerva-1_0b3.jar - All files from jbossmq.jar - All files from jbosssx.jar - All files from jbosscx-0.2.jar except org.jboss.resource.RARDepolyer, -which should be imported as source from CVS (ver 1.3) so to change tmp.properties reference (see below) - All org.jnp.server.* files from jnpdserver.jar except Main class needed to change reference to jnp.properties file (see below) - All files in ejxejb.jar - All files in ejxeditor.jar - All files in awt.jar - All files for openjms-client-patched-0.5.1.jar - All files from openjms-pool.jar - All files from openjms-rmi-patched-0.5.1.jar - For organization purposes you might want to put the following class into separate projects: - All files in jms.jar -- Java Messaging Service (into separate JMS project) - All files in jaas.jar -- Java's Security API (into JAAS project) - All files in jmxri.jar -- Java Management Extension API (into JMX project) - All files in crimson.jar (into Apache Crimson project) - All files from xml.jar and jaxp.jar - jdbc2_0-stdext.jar -- JDBC 2.0 Extensions - ejb.jar -- EJB 1.1 interfaces - javax.ejb.MessageDrivenBean and javax.ejb.MessageDrivenContext from ejb2.0.jar - jndi.jar -- if not already in VAJ -NOTE: HSQL and InstantDB can be finicky and freeze upon startup of jBoss. Do not install these if they are not needed. PostgreSQL or Oracle are preferred alternatives. - hsql.jar -- optional HSQL database. - idb.jar -- optional InstantDB database - jpl-util-0_5b.jar - jta-spec1_0_1.jar -- (javax.transaction package will be updated elsewhere) - mail.jar -- JavaMail API - activation.jar -- Java Activation Frameworks - connector.jar -- Java Connector Architecture - </programlisting> - </listitem> - </orderedlist> - </listitem> - <listitem> - <para>Directories to be added to VAJ's <![CDATA[<vaj.home>]]>/ide/program_resources/jboss directory -from jBoss zip archive:</para> - <programlisting> - bin - client - conf/default - db -- for InstantDB and Hypersonic - deploy -- EJB autodeploy directory - lib (with ext subdir) -- all the jars - log - tmp -</programlisting> - </listitem> - <listitem> - <para>Change the references to configuration files in the source code:</para> - <itemizedlist> - <listitem> - <para> - <emphasis> jboss.conf:</emphasis> - </para> - <para> In org.jboss.Main.Main() add conf/default in line:</para> - <para> URL mletConf = mlet.getResource("conf/default/jboss.conf") </para> - </listitem> - <listitem> - <para> - <emphasis>jboss.jcml:</emphasis> - </para> - <para>In org.jboss.configuration.ConfigurationService.loadConfiguration() add conf/default in line:</para> - <para>InputStream conf = Thread.currentThread().getContextClassLoader().getResourceAsStream "conf/default/jboss.jcml");</para> - </listitem> - <listitem> - <para> - <emphasis>jndi.properties</emphasis> - </para> - <para>org.jboss.naming.NamingService.initService() add conf/default in line:</para> - <para>System.getProperties().load(Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/default/jndi.properties"));</para> - <para>org.jboss.Main.Main() add conf/default in line:</para> - <para>URL jndiLocation = this.getClass().getResource("conf/default/jndi.properties");</para> - </listitem> - <listitem> - <para> - <emphasis>tmp.properties</emphasis> - </para> - <para>org.jboss.deployment.J2eeDeployer.initService() add /tmp in line:</para> - <para>URL tmpDirUrl = getClass().getResource("/tmp/tmp.properties");</para> - <para>org.jboss.resource.RARDeployer.initService() add /tmp in line:</para> - <para>URL tmpPropURL = getClass().getResource("/tmp/tmp.properties");</para> - </listitem> - <listitem> - <para> - <emphasis>db.properties</emphasis> - </para> - <para>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.init() add db/ in line:</para> - <para>File databaseDir = new File(getClass().getResource("db/db.properties").getFile()).getParentFile();</para> - <para>org.jboss.jdbc.HypersonicDatabase.startService() add /db/ in line:</para> - <para>URL dbLocator = getClass().getResource("/db/db.properties");</para> - </listitem> - <listitem> - <para> - <emphasis> standardjaws.xml</emphasis> - </para> - <para>org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load() add conf/default in line:</para> - <para>URL stdJawsUrl = classLoader.getResource("conf/default/standardjaws.xml");</para> - </listitem> - <listitem> - <para> - <emphasis>standardjboss.xml</emphasis> - </para> - <para>org.jboss.metadata.XmlFileLoader.load() add conf/default in line:</para> - <para>URL defaultJbossUrl = Thread.currentThread().getContextClassLoader().getResource("conf/default/standardjboss.xml");</para> - </listitem> - <listitem> - <para> - <emphasis>jnp.properties</emphasis> - </para> - <para>org.jnp.server.Main.Main() add conf/default in line:</para> - <para>System.getProperties().load(getClass().getClassLoader().getResourceAsStream("conf/default/jnp.properties"));</para> - </listitem> - <listitem> - <para> - <emphasis>log.properties</emphasis> - </para> - <para>org.jboss.logging.FileLogging.openLogFile() add /log in line:</para> - <para>URL properties = getClass().getResource("/log/log.properties");</para> - </listitem> - <listitem> - <para> - <emphasis>jboss-auto.jcml</emphasis> - </para> - <para>org.jboss.configuration.ConfigurationService.loadConfiguration() add conf/default in line:</para> - <para>conf = Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/default/jboss-auto.jcml");</para> - <para>org.jboss.configuration.ConfigurationService.saveConfiguration() add conf/default in line:</para> - <para>URL confFile = Thread.currentThread().getContextClassLoader().getResource("conf/default/jboss-auto.jcml");</para> - </listitem> - <listitem> - <para> - <emphasis>mail.properties</emphasis> - </para> - <para>org.jboss.mail.MailService.startService() add conf/default in line:</para> - <para>if (properties == null) {properties = "conf/default/mail.properties";}</para> - <para>in jboss.jcml add conf/default in mail.properties line:</para> - <para><![CDATA[ - <attribute name="ConfigurationFile">conf/default/mail.properties</attribute> - ]]></para> - </listitem> - <listitem> - <para> - <emphasis>jbossmq.properties</emphasis> - </para> - <para>org.jbossmq.Log.getLevel() add conf/default in line:</para> - <para>InputStream in = Thread.currentThread().getContextClassLoader().getResource("conf/default/jbossmq.properties").openStream();</para> - </listitem> - <listitem> - <para> - <emphasis>jbossmq.xml</emphasis> - </para> - <para>org.jbossmq.server.JMSServer.saveConfig() add conf/default in line:</para> - <para>String file = getClass().getClassLoader().getResource("conf/default/jbossmq.xml").getFile();</para> - <para>org.jbossmq.server.StartServer.run() add conf/default in line:</para> - <para>InputStream in = getClass().getClassLoader().getResource("conf/default/jbossmq.xml").openStream();</para> - <para>org.jbossmq.persistence.PersistenceManager() add conf/default in line:</para> - <para>URL configFile = getClass().getClassLoader().getResource("conf/default/jbossmq.xml");</para> - </listitem> - </itemizedlist> - </listitem> - <listitem> - <para>Properties to change in <classname>org.jboss.Main</classname> (right click on class and -bring up Properties dialog) (NOTE -- please adjust the path to point to your Visual Age install -directory):</para> - <orderedlist> - <listitem> - <para>Program tab:</para> - <para>1. Command line argument:</para> - <para>conf/default</para> - <para>2. Properties: (as listed)</para> - <para>jboss.home="e:/Program Files/Ibm/VisualAge for Java/ide/project_resources/jboss" Note that this command line should be quoted if there are spaces in the -command line (like Program Files).</para> - </listitem> - <listitem> - <para>Classpath tab:</para> - <para>1. Project Path: Add any other projects that jBoss needs if classes it contains are not in the jBoss project.</para> - <para>2. Extra Directories Path:</para> - <orderedlist> - <listitem> - <para>Add all jar files in <![CDATA[<jboss.home>]]>/lib and <![CDATA[<jboss.home>]]>/lib/ext</para> - </listitem> - <listitem> - <para>Add the following directories: "./conf/default;./db;./deploy;./log"</para> - </listitem> - </orderedlist> - </listitem> - </orderedlist> - </listitem> - <listitem> - <para>For <classname>org.jboss.jmx.server.RMIConnectorImpl</classname>, -<classname>org.jboss.jmx.JMXAdaptorImpl</classname>, -<classname>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</classname>, -<classname>org.jbossmq.distributed.server.ConnectionReceiverRMIImpl</classname> and <classname>org.jbossmq.distributed.server.DistributedJMSServerRMIImpl</classname>, manually generate RMI stub/skeleton using VAJ's built-in RMI tool . You might need to temporarily move java.transaction.* into the jboss project for the rmic compiler to function without errors for JRMPContainerInvoker. - </para> - </listitem> - <listitem> - <para>In jboss.conf (in <![CDATA[<jboss.home>]]>/conf/default directory): </para> - <itemizedlist> - <listitem> - <para>Change all references to ../../ in file to ./ using search and replace</para> - </listitem> - <listitem> - <para>Change references to ../xml.jar to ./xml.jar</para> - </listitem> - </itemizedlist> - </listitem> - <listitem> - <para>In jboss.jcml (in <![CDATA[<jboss.home>]]>/conf/default directory - change ../deploy to ./deploy in this tag:</para> - <programlisting><![CDATA[ - <mbean code="org.jboss.ejb.AutoDeployer" name="EJB:service=AutoDeployer"> - <attribute name="Deployer">J2EE:service=J2eeDeployer</attribute> - <attribute name="URLs">./deploy</attribute> - </mbean> - ]]></programlisting> - <para>a. Change single reference to ../conf/default/instantdb.properties to ./conf/default/instantdb.properties</para> - </listitem> - <listitem> - <para>In instantdb.properties (in <![CDATA[<jboss.home>]]>/conf/default directory) change all references to ../../ to ./.</para> - </listitem> - <listitem> - <para>In org.jboss.util.Shutdown.preRegister(), comment out this shutdown hook code: - </para> - <programlisting> - /* Modified by Craig since addShutdownHook is implemented in JDK 1.3 - try - { - - Runtime.getRuntime().addShutdownHook(new Thread() - { - public void run() - { - System.out.println("Shutting down"); - - // Make sure all services are down properly - shutdownServices(); - - System.out.println("Shutdown complete"); - } - }); - log.log("Shutdown hook added"); - */ - //} catch (Throwable e) - //{ - log.error("Could not add shutdown hook"); - //} - - </programlisting> - </listitem> - </orderedlist> - </section> - <!--End of manual import section. --> - <section id="running-and-debugging"> - <title>Running and debugging EJBs inside of Visual Age</title> - <orderedlist> - <listitem> - <para>Create META-INF subdirectory in the deploy directory of <![CDATA[<jboss.home>]]>.</para> - <para>a. Add ejb-jar.xml and both jboss.xml and jaws.xml (if needed) to the directory.</para> - </listitem> - <listitem> - <para>Run <classname>org.jboss.Main</classname> using VAJ run command to start jBoss.</para> - </listitem> - <listitem> - <para>Make sure any projects that contain EJBs that you are developing are in the classpath of <classname>org.jboss.Main</classname>.</para> - </listitem> - <listitem> - <para>If running EJBs from servlets/JSPs, make sure that jBoss's project is in Tomcat's -classpath (the <classname>com.ibm.ivj.tomcat.TomcatRunner</classname> class). If you are calling EJBs from a client class with a main() method, make sure the jBoss project is in its -classpath in addition to all jars from the <![CDATA[<jboss.home>]]>/client directory. -</para> - </listitem> - <listitem> - <para>To debug, set breakpoints inside of EJB bean class.</para> - </listitem> - <listitem> - <para>To allow changes to EJBs to take effect in VAJ, either restart jBoss -or touch one of the XML files in the <![CDATA[<jboss.home>]]>/deploy/META-INF directory.</para> - </listitem> - </orderedlist> - </section> - <!-- End of running-and-debugging section --> -</section> +<!-- DOCTYPE section SYSTEM "D:\cvsroot\manual\src\docs\docbookx\docbookx.dtd" --> +<section id="vajdebug"> + <title> + How to Run and Debug EJBs using jBoss 2.2.2 inside of + Visual Age for Java version 3.5 (patch 2) +</title> + <para> + Author: + <author> + <firstname>Craig</firstname> + <surname>Doremus</surname> + </author> + <email>[EMAIL PROTECTED]</email> + <author> + <firstname>Alex</firstname> + <surname>Lee</surname> + </author> + <email>[EMAIL PROTECTED]</email> + </para> + <para>Importing jBoss into Visual Age for Java (VAJ) allows you to develop and +debug EJBs using the latest Enterprise Java Beans standard (version 1.1 and Message Driven EJBs). +The Enterprise version of Visual Age has built-in EJB debugging, but that +edition of the IDE only supports version 1.0 of the EJB spec. Currently, Visual Age only +supports JDK 1.2.2. +</para> + <para> + We created a jBoss Test Environment by manually importing jBoss source + into Visual Age for Java. This import also + involved a few code hacks to remove JDK 1.3 + code, to change the paths to configuration files and some + modification of paths inside of configuration files. +</para> + <para> + Our jBoss import does not include an integrated + <ulink url="http://jakarta.apache.org/tomcat/index.html">Jakarta-Tomcat</ulink> servlet engine. + IBM provides a Test Environment for Tomcat version 3.1 on their web site <ulink url="http://www7.software.ibm.com/vad.nsf/Data/Document2390?OpenDocument&p=1&BCT=3&Footer=1">here</ulink>, + that allows debugging of JSP and servlets inside of VAJ. Both Tomcat + and jBoss can be run inside of VAJ to provide the ability to debug EJBs + called by servlets. +</para> + <section id="vajdebug-requirements"> + <title>Requirements</title> + <itemizedlist> + <listitem> + <para>Visual Age for Java Professional or Enterprise Edition Version 3.5 with patch 2 installed. Version 3.5.3 has recently been released, but there are some RMI bugs in it so we can't recommend using it at this time.</para> + </listitem> + <listitem> + <para>JBoss-2.2.2.zip downloaded (NOT the one with integrated Tomcat) <ulink url="http://prdownloads.sourceforge.net/jboss/JBoss-2.2.2.zip">Download it here</ulink> + </para> + </listitem> + </itemizedlist> + </section> + <!-- end of vajdebug-requirements section --> + <!-- MANUAL IMPORT SECTION START --> + <section id="vajdebug-manualimport"> + <title>Manually importing jBoss 2.2.2 source code into Visual Age</title> + <orderedlist> + <listitem> + <para>Unzip JBoss-2.2.2.zip into a temporary directory.</para> + </listitem> + <listitem> + <para>Create a jBoss project in VAJ. If jBoss 2.0 is already installed, version it and delete all files and related projects before proceeding with the jBoss 2.2.2 install. + </para> + </listitem> + <listitem> + <para>Import source, jar and class files into VAJ from the temporary directory including:</para> + <orderedlist> + <listitem> + <para>All jBoss source (src subdirectory). + </para> + <para>Source of org.jnp.server (both *.class and *.java files) from <ulink url="/doco_files/vaj-jnpserver222.zip">here</ulink>. +</para> + <para>Source of org.jbossmq.* from <ulink url="/doco_files/vaj-jbossmq222.zip">here</ulink>.</para> + <para>org.jboss.security.SecurityAssociation source from CVS (version 1.5, which can be found <ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jboss/src/main/org/jboss/security/SecurityAssociation.java?rev=1.5&content-type=text/vnd.viewcvs-markup">here)</ulink></para> + + <para>org.jboss.naming.NamingService from CVS (version 1.9, which can be found <ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/jboss/jboss/src/main/org/jboss/naming/NamingService.java?rev=1.9&content-type=text/x-java">here)</ulink></para> + </listitem> + <listitem> + <para>In lib or lib/ext directory import the class files: </para> + <programlisting> + All files from minerva-1_0b3.jar + All files from jbosssx.jar + All files from jbosscx-0.2.jar except org.jboss.resource.RARDepolyer.class, org.jboss.resource.RARDepolyer$1.class and org.jboss.resource.RARDepolyer$DeploymentInfo.class. +org.jboss.resource.RARDepolyer should be imported as source from CVS (ver 1.3) so to change tmp.properties reference (see below) + All files in ejxejb.jar + All files in ejxeditor.jar + All files in awt.jar + All files for openjms-client-patched-0.5.1.jar + All files from openjms-pool.jar + All files from openjms-rmi-patched-0.5.1.jar + For organization purposes you might want to put the following class into separate projects: + All files in jms.jar -- Java Messaging Service (into separate JMS project) + All files in jaas.jar -- Java's Security API (into JAAS project) + All files in jmxri.jar -- Java Management Extension API (into JMX project) + All files in crimson.jar (into Apache Crimson project) + All files from xml.jar and jaxp.jar + jdbc2_0-stdext.jar -- JDBC 2.0 Extensions + ejb.jar -- EJB 1.1 interfaces + javax.ejb.MessageDrivenBean and javax.ejb.MessageDrivenContext from ejb2.0.jar + jndi.jar -- if not already in VAJ +NOTE: HSQL and InstantDB can be finicky and freeze upon startup of jBoss. Do not install these if they are not needed. PostgreSQL or Oracle are preferred alternatives. + hsql.jar -- optional HSQL database. + jpl-util-0_5b.jar + jta-spec1_0_1.jar -- (javax.transaction package will be updated elsewhere) + mail.jar -- JavaMail API + activation.jar -- Java Activation Frameworks + connector.jar -- Java Connector Architecture + </programlisting> + </listitem> + </orderedlist> + </listitem> + <listitem> + <para>Directories to be added to VAJ's <![CDATA[<vaj.home>]]>/ide/project_resources/jboss directory +from jBoss zip archive:</para> + <programlisting> + bin + client + conf/default + db -- for InstantDB and Hypersonic + deploy -- EJB autodeploy directory + lib (with ext subdir) -- all the jars + log + tmp +</programlisting> + </listitem> + <listitem> + <para>Change the references to configuration files in the source code:</para> + <itemizedlist> + <listitem> + <para> + <emphasis> jboss.conf:</emphasis> + </para> + <para> In org.jboss.Main.Main() add conf/default in line:</para> + <para> URL mletConf = mlet.getResource("conf/default/jboss.conf") </para> + </listitem> + <listitem> + <para> + <emphasis>jboss.jcml:</emphasis> + </para> + <para>In org.jboss.configuration.ConfigurationService.loadConfiguration() add conf/default in line:</para> + <para>InputStream conf = Thread.currentThread().getContextClassLoader().getResourceAsStream "conf/default/jboss.jcml");</para> + + <para>In org.jboss.configuration.ConfigurationService.loadConfiguration() add conf/default in line:</para> + <para>conf = Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/default/jboss.jcml");</para> + + </listitem> + <listitem> + <para> + <emphasis>jndi.properties</emphasis> + </para> + <para>org.jboss.naming.NamingService.initService() add conf/default in line:</para> + <para>System.getProperties().load(Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/default/jndi.properties"));</para> + <para>org.jboss.Main.Main() add conf/default in line:</para> + <para>URL jndiLocation = this.getClass().getResource("conf/default/jndi.properties");</para> + </listitem> + <listitem> + <para> + <emphasis>tmp.properties</emphasis> + </para> + <para>org.jboss.deployment.J2eeDeployer.initService() add /tmp in line:</para> + <para>URL tmpDirUrl = getClass().getResource("/tmp/tmp.properties");</para> + <para>org.jboss.resource.RARDeployer.initService() add /tmp in line:</para> + <para>URL tmpPropURL = getClass().getResource("/tmp/tmp.properties");</para> + </listitem> + <listitem> + <para> + <emphasis>db.properties</emphasis> + </para> + <para>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.init() add db/ in line:</para> + <para>File databaseDir = new File(getClass().getResource("db/db.properties").getFile()).getParentFile();</para> + <para>org.jboss.jdbc.HypersonicDatabase.startService() add /db/ in line:</para> + <para>URL dbLocator = getClass().getResource("/db/db.properties");</para> + </listitem> + <listitem> + <para> + <emphasis> standardjaws.xml</emphasis> + </para> + <para>org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load() add conf/default in line:</para> + <para>URL stdJawsUrl = classLoader.getResource("conf/default/standardjaws.xml");</para> + </listitem> + <listitem> + <para> + <emphasis>standardjboss.xml</emphasis> + </para> + <para>org.jboss.metadata.XmlFileLoader.load() add conf/default in line:</para> + <para>URL defaultJbossUrl = Thread.currentThread().getContextClassLoader().getResource("conf/default/standardjboss.xml");</para> + </listitem> + <listitem> + <para> + <emphasis>jnp.properties</emphasis> + </para> + <para>org.jnp.server.Main.Main() add conf/default in line:</para> + <para>System.getProperties().load(getClass().getClassLoader().getResourceAsStream("conf/default/jnp.properties"));</para> + </listitem> + <listitem> + <para> + <emphasis>log.properties</emphasis> + </para> + <para>org.jboss.logging.FileLogging.openLogFile() add /log in line:</para> + <para>URL properties = getClass().getResource("/log/log.properties");</para> + </listitem> + <listitem> + <para> + <emphasis>jboss-auto.jcml</emphasis> + </para> + <para>org.jboss.configuration.ConfigurationService.loadConfiguration() add conf/default in line:</para> + <para>conf = Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/default/jboss-auto.jcml");</para> + <para>org.jboss.configuration.ConfigurationService.saveConfiguration() add conf/default in line:</para> + <para>URL confFile = Thread.currentThread().getContextClassLoader().getResource("conf/default/jboss-auto.jcml");</para> + </listitem> + <listitem> + <para> + <emphasis>mail.properties</emphasis> + </para> + <para>org.jboss.mail.MailService.startService() add conf/default in line:</para> + <para>if (properties == null) {properties = "conf/default/mail.properties";}</para> + <para>in jboss.jcml (in VAJ's <![CDATA[<vaj.home>]]>/ide/project_resources/jboss/conf/default directory) add conf/default in mail.properties line:</para> + <para><![CDATA[ + <attribute name="ConfigurationFile">conf/default/mail.properties</attribute> + ]]></para> + </listitem> + <listitem> + <para> + <emphasis>jbossmq.properties</emphasis> + </para> + <para>org.jbossmq.Log.getLevel() add conf/default in line:</para> + <para>InputStream in = Thread.currentThread().getContextClassLoader().getResource("conf/default/jbossmq.properties").openStream();</para> + </listitem> + <listitem> + <para> + <emphasis>jbossmq.xml</emphasis> + </para> + <para>org.jbossmq.server.JMSServer.saveConfig() add conf/default in line:</para> + <para>String file = getClass().getClassLoader().getResource("conf/default/jbossmq.xml").getFile();</para> + <para>org.jbossmq.server.StartServer.run() add conf/default in line:</para> + <para>InputStream in = getClass().getClassLoader().getResource("conf/default/jbossmq.xml").openStream();</para> + <para>org.jbossmq.persistence.PersistenceManager.PersistenceManager() add conf/default in line:</para> + <para>URL configFile = getClass().getClassLoader().getResource("conf/default/jbossmq.xml");</para> + </listitem> + </itemizedlist> + </listitem> + <listitem> + <para>Properties to change in <classname>org.jboss.Main</classname> (right click on class and +bring up Properties dialog) (NOTE -- please adjust the path to point to your Visual Age install +directory):</para> + <orderedlist> + <listitem> + <para>Program tab:</para> + <para>1. Command line argument:</para> + <para>conf/default</para> + <para>2. Properties: (as listed)</para> + <para>jboss.home="e:/Program Files/Ibm/VisualAge for Java/ide/project_resources/jboss" Note that this command line should be quoted if there are spaces in the +command line (like Program Files).</para> + </listitem> + <listitem> + <para>Classpath tab:</para> + <para>1. Project Path: Add any other projects that jBoss needs if classes it contains are not in the jBoss project.</para> + <para>2. Extra Directories Path:</para> + <orderedlist> + <listitem> + <para>Add the following jar files from the <![CDATA[<jboss.home>]]>/lib or <![CDATA[<jboss.home>]]>/lib/etx directory : lib\ext\dynaserver.jar;lib\ext\ejxjaws.jar;lib\ext\ejxjboss.jar;lib\ext\exolabcore-0.1.jar;lib\ext\gnu-regexp-1.0.8.jar;lib\ext\jboss.jar;lib\ext\jbossmq.jar;lib\ext\jetty-service.jar;lib\ext\jmxtools.jar;lib\ext\jnpserver.jar;lib\ext\tomcat-service.jar;lib\jboss-jaas.jar</para> + </listitem> + <listitem> + <para>Add the following directories: "./conf/default;./db;./deploy;./log"</para> + </listitem> + </orderedlist> + </listitem> + </orderedlist> + </listitem> + <listitem> + <para>For <classname>org.jboss.jmx.server.RMIConnectorImpl</classname>, +<classname>org.jboss.jmx.JMXAdaptorImpl</classname>, +<classname>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</classname>, +<classname>org.jbossmq.distributed.server.ConnectionReceiverRMIImpl</classname> and <classname>org.jbossmq.distributed.server.DistributedJMSServerRMIImpl</classname>, manually generate RMI stub/skeleton using VAJ's built-in RMI tool (Right click on the class and select Tools --> Generate RMI/JDK 1.2 --> stubs/skeleton). You might need to temporarily move java.transaction.* into the jboss project for the rmic compiler to function without errors for JRMPContainerInvoker or directly import the RMI stub from the binary jboss.jar (org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.class). + </para> + </listitem> + <listitem> + <para>In jboss.conf (in <![CDATA[<jboss.home>]]>/conf/default directory): </para> + <itemizedlist> + <listitem> + <para>Change all references from ../../ in file to ./ using search and replace</para> + </listitem> + <listitem> + <para>Change references from ../xml.jar to ./xml.jar</para> + </listitem> + </itemizedlist> + </listitem> + <listitem> + <para>In jboss.jcml (in <![CDATA[<jboss.home>]]>/conf/default directory) + change ../deploy to ./deploy in this tag:</para> + <programlisting><![CDATA[ + <mbean code="org.jboss.ejb.AutoDeployer" name="EJB:service=AutoDeployer"> + <attribute name="Deployer">J2EE:service=J2eeDeployer</attribute> + <attribute name="URLs">./deploy</attribute> + </mbean> + ]]></programlisting> + <para>a. Change single reference from ../conf/default/instantdb.properties to ./conf/default/instantdb.properties</para> + </listitem> + <listitem> + <para>In instantdb.properties (in <![CDATA[<jboss.home>]]>/conf/default directory) change all references from ../../ to ./.</para> + </listitem> + <listitem> + <para>In org.jboss.util.Shutdown.preRegister(), comment out this shutdown hook code: + </para> + <programlisting> + /* Modified by Craig since addShutdownHook is implemented in JDK 1.3 + try + { + + Runtime.getRuntime().addShutdownHook(new Thread() + { + public void run() + { + System.out.println("Shutting down"); + + // Make sure all services are down properly + shutdownServices(); + + System.out.println("Shutdown complete"); + } + }); + log.log("Shutdown hook added"); + */ + //} catch (Throwable e) + //{ + log.error("Could not add shutdown hook"); + //} + + </programlisting> + </listitem> + + <listitem> + <para>Removing InstantDB from VAJ (do this if it freezes VAJ during startup). + </para> + + <para>This can be done by remove all references to InstantDB in the <![CDATA[<jboss.home>]]>/conf/default/jboss.jcml file. + </para> + </listitem> + + + </orderedlist> + </section> + <!--End of manual import section. --> + <section id="running-and-debugging"> + <title>Running and debugging EJBs inside of Visual Age</title> + <orderedlist> + <listitem> + <para>Create META-INF subdirectory in the deploy directory of <![CDATA[<jboss.home>]]>.</para> + <para>a. Add ejb-jar.xml and both jboss.xml and jaws.xml (if needed) to the directory.</para> + </listitem> + <listitem> + <para>Run <classname>org.jboss.Main</classname> using VAJ run command to start jBoss.</para> + </listitem> + <listitem> + <para>Make sure any projects that contain EJBs that you are developing are in the classpath of <classname>org.jboss.Main</classname>.</para> + </listitem> + <listitem> + <para>If running EJBs from servlets/JSPs, make sure that jBoss's project is in Tomcat's +classpath (the <classname>com.ibm.ivj.tomcat.TomcatRunner</classname> class). If you are calling EJBs from a client class with a main() method, make sure the jBoss project is in its +classpath in addition to all jars from the <![CDATA[<jboss.home>]]>/client directory. +</para> + </listitem> + <listitem> + <para>To debug, set breakpoints inside of EJB bean class.</para> + </listitem> + <listitem> + <para>To allow changes to EJBs to take effect in VAJ, either restart jBoss +or touch one of the XML files in the <![CDATA[<jboss.home>]]>/deploy/META-INF directory.</para> + </listitem> + </orderedlist> + </section> + <!-- End of running-and-debugging section --> +</section> + _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
