📄 ch10.html
字号:
<path>/$JBOSS_TOMCAT_HOME/jboss/conf</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/jaas.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/jboss-jaas.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/jdbc2_0-stdext.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/jmxri.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/tomcat/lib/parser.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/tomcat/lib/servlet.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/tomcat/lib/jaxp.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/tomcat/lib/webserver.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/tomcat/lib/jasper.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/activation.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/awt.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/dynaserver.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejb.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxeditor.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxejb.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxjaws.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/ejxjboss.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/hsql.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/idb.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jboss.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jetty-service.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jms.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jmxtools.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jndi.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jnpserver.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jpl-util-0_5b.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jta-spec1_0_1.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/mail.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/tomcat-service.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbossmq.jar]</path>
<path>/$JBOSS_TOMCAT_HOME/jboss/db</path>
<path>/$JBOSS_TOMCAT_HOME/jboss/conf/default</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/log4j.jar]</path>
<path>/$JBOSS_TOMCAT_HOME/jboss/log</path>
<path>/$JBOSS_TOMCAT_HOME/jboss/tmp</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbosssx.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/jbosscx-0.2.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/connector.jar]</path>
<path>[/$JBOSS_TOMCAT_HOME/jboss/lib/ext/minerva-1_0b3.jar]</path>
</class>
<source>
<path>/$JBOSS_TOMCAT_HOME/jboss/src</path>
</source>
</library>
</pre></p><p>
A note about the initial file directory specifier. I have seen this a
couple of ways, if you have multiple hard drives with the home on C and the
JBoss on D for example you will see 'D%|/' in place of / or alternatively
you may see a relative directory such as ../../JBoss-2.2.1....
</p></div><div class="section"><a name="d0e6796"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6796"></a>Bypass the hanging InstantDB embedded database</h3></div></div><p>
I found that loading instant DB within its minnerva pool manager
occasionally causes the debugger to hang (on different setups), to work
around this, I made the following modifications to config/tomcat and also
config/default (it depends on the model you wish to start up JBoss in)
</p><p><pre class="programlisting">
<!-- JDBC @JC org.enhydra.instantdb.jdbc.idbDriver removed from list of drivers -->
<mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
<!-- <attribute name="Drivers">org.hsql.jdbcDriver,
org.enhydra.instantdb.jdbc.idbDriver</attribute> HANGS DRIVER -->
<attribute name="Drivers">org.hsql.jdbcDriver</attribute>
</mbean>
</pre></p><p>
and comment out the minnerva pool definitions associated with InstantDB
</p><p><pre class="programlisting">
<!--
<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=InstantDB">
<attribute name="PoolName">InstantDB</attribute>
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:idb:../conf/default/instantdb.properties</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">10</attribute>
<attribute name="Password" />
<attribute name="GCEnabled">false</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>
-->
</pre></p></div><div class="section"><a name="d0e6809"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6809"></a>Sprinkle breakpoints throughout your EJB and or Client Code</h3></div></div><p>
Firstly it is necessary to put breakpoints in your ejb's. As outlined
previously project settings should point to the source of your beans. Open
up a typical bean implementation and place breakpoints whereever desired.
</p></div><div class="section"><a name="d0e6814"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6814"></a>Start the JBoss server</h3></div></div><p>
Using the IDE, select run / start debugger (shift + f9). If you want to see
your beans being instantiated by the deployer, place breakpoints on the bean
constructors (if you specified them) You will not need to have a client
running to exercise this functionality.
</p></div><div class="section"><a name="d0e6819"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6819"></a>Deploy the Beans</h3></div></div><p>
copy of drag/drop (for windoze fans) the ejb jar file containing the
ejb-jar.xml and jboss.xml (optional) to the deploy folder. If you have set
breakpoints in stateless session ejb's these should cause the debugger to
stop in your code! Hurrah!
</p></div><div class="section"><a name="d0e6824"></a><div class="titlepage"><div><h3 class="title"><a name="d0e6824"></a>Start the Client Test Application</h3></div></div><p>
If you include a client test code in your project you can debug this also
(even though the project's main execution class is specified as
'org.jboss.Main'. To do this, select the test client class from the project
class pane and from the popup context meny, select debug. You should be
aware though that this debug session will run from the
$JBOSS_TOMCAST_HOME/jboss/bin directory since this is where we set the ejb
project to execute from (see above). If all goes well, you will have 2
running tabs in the messages window, one of these will be called Main (this
is the JBoss server process and this is where you can single step through
EJB code while the other is the test client. One thing though, the timeouts
are somewhat short so if you spend too much time in a method within the EJB
you may find that transactions are rolled back.
</p><p>
If anyone has suggestions of feedback please let me know, I can be contacted
via email at jcoffey@pingtel.com
</p></div></div></div><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="432" height="79"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch09.html#d0e6667" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch09.html#d0e6667"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch10s10.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch10s10.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -