blob: 2a884db7c6b3f39f64d0e3120a162d4ed62c2eb8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<!-- $PAGETITLE -->
<TITLE>OpenEJB - Source Code</TITLE>
<LINK href="http://openejb.apache.org/all.css" rel="stylesheet" type="text/css">
<!--[if IE]><link rel="stylesheet" type="text/css" media="screen, projection" href="openejb.apache.org/ie.css"><![endif]-->
<LINK rel="SHORTCUT ICON" href="http://openejb.apache.org/images/favicon.ico">
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
<SCRIPT language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></SCRIPT>
<SCRIPT language="javascript" src="http://openejb.apache.org/tweet/jquery.tweet.js" type="text/javascript"></SCRIPT>
<SCRIPT type="text/javascript">
$(document).ready(function(){
$(".tweet").tweet({
avatar_size: 32,
count: 4,
fetch:25,
username: "openejb",
list: "contributors",
template:"{avatar}{text}",
filter: function(t){ return /openejb/i.test(t["tweet_raw_text"]); },
loading_text: "loading list..."
});
});
</SCRIPT>
</HEAD>
<BODY>
<!-- Delay the loading of the external javascript file needed for labels (as it takes too long to load and visibly holds loading of the page body) -->
<!-- To do this without javascript errors over undefined functions, we need to declare stubs here (that are overrided later by the proper implementations) -->
<SCRIPT language="JavaScript" type="text/javascript">
function doAddLabel(hideTextfieldAfterAddParam)
{
// stub
}
function onAddLabel()
{
// stub
}
function showLabelsInput()
{
// stub
}
</SCRIPT>
<A name="top"></A>
<TABLE class="frameTable" cellpadding="0" cellspacing="0" border="0">
<TR class="Row1">
<TD class="Col1"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col2"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col3"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
</TR>
<TR class="Row2">
<TD class="Col1"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3" id="breadcrumbs">
<!-- $TOP_NAV_BAR -->
<A href="index.html" title="Index">Home</A> | <A href="news.html" title="News">News</A> | <A href="faq.html" title="FAQ">FAQ</A> | <A href="download.html" title="Download">Download</A> | <A href="mailing-lists.html" title="Mailing Lists">Lists</A> | <A href="http://issues.apache.org/jira/browse/OPENEJB" class="external-link" rel="nofollow">Issues</A>
</TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">&nbsp;</TD>
</TR>
<TR class="Row3">
<TD class="Col1"><IMG alt="" class="Row3Img" id="thinLine" src="http://openejb.apache.org/images/line_sm.gif"></TD>
<TD class="Col2"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col3"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col4"><IMG alt="" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5"><IMG alt="" class="Row3Img" src="http://openejb.apache.org/images/dotTrans.gif"></TD>
</TR>
<TR class="Row4">
<TD class="Col1">
<SPAN id="Navigation">
<H3><A name="Navigation-Overview"></A>Overview</H3>
<UL class="alternate" type="square">
<LI><A href="index.html" title="Index">Home</A></LI>
<LI><A href="news.html" title="News">News</A></LI>
<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
<LI><A href="download.html" title="Download">Download</A></LI>
<LI><A href="../OPENEJBx30/index.html" title="Index">Documentation</A></LI>
<LI><A href="examples.html" title="Examples">Examples</A></LI>
<LI><A href="http://cwiki.apache.org/confluence/display/OPENEJB/Lightening%20Demos" class="external-link" rel="nofollow">Lightning Demos</A></LI>
<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
<LI><A href="" title="Source Code">Source Code</A></LI>
<LI><A href="http://blogs.apache.org/openejb" class="external-link" rel="nofollow">Project Blog</A></LI>
</UL>
<H3><A name="Navigation-Servers"></A>Servers</H3>
<UL class="alternate" type="square">
<LI><A href="local-server.html" title="Local Server">Local</A></LI>
<LI><A href="remote-server.html" title="Remote Server">Remote</A></LI>
</UL>
<H3><A name="Navigation-Integrations"></A>Integrations</H3>
<UL class="alternate" type="square">
<LI><A href="../OPENEJBx30/tomcat.html" title="Tomcat">Tomcat</A></LI>
<LI><A href="geronimo.html" title="Geronimo">Geronimo</A></LI>
<LI><A href="webobjects.html" title="WebObjects">WebObjects</A></LI>
</UL>
<H3><A name="Navigation-Community"></A>Community</H3>
<UL class="alternate" type="square">
<LI><A href="team.html" title="Team">Team</A></LI>
<LI><A href="articles.html" title="Articles">Articles</A></LI>
<LI><A href="http://webchat.freenode.net/?channels=openejb" class="external-link" rel="nofollow">IRC</A></LI>
</UL>
<H3><A name="Navigation-RelatedProjects"></A>Related Projects</H3>
<UL class="alternate" type="square">
<LI><A href="http://activemq.apache.org/" class="external-link" rel="nofollow">ActiveMQ</A></LI>
<LI><A href="http://openjpa.apache.org/" class="external-link" rel="nofollow">OpenJPA</A></LI>
<LI><A href="http://cxf.apache.org/" class="external-link" rel="nofollow">CXF</A></LI>
</UL>
<H3><A name="Navigation-Index"></A>Index</H3>
<UL class="alternate" type="square">
<LI><A href="space-index.html" title="Space Index">Site Index</A></LI>
<LI><A href="../OPENEJBx30/space-index.html" title="Space Index">Doc Index</A></LI>
</UL>
<H3>
<A name="Navigation-Feeds"></A>
Feeds
</H3>
<UL class="feeds">
<LI>
<A href="http://cwiki.apache.org/confluence/spaces/rss.action?key=OPENEJB&newPages=false">
<IMG src="http://openejb.apache.org/images/rss.gif"></A>
<A class="feedsText" href="http://cwiki.apache.org/confluence/spaces/rss.action?key=OPENEJB&newPages=false">Site</A>
</LI>
<LI><A href="http://cwiki.apache.org/confluence/spaces/blogrss.action?key=OPENEJB">
<IMG src="http://openejb.apache.org/images/rss.gif"></A>
<A class="feedsText" href="http://cwiki.apache.org/confluence/spaces/blogrss.action?key=OPENEJB">News</A>
</LI>
</UL>
</SPAN>
</TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3">
<TABLE id="PageHeader" border="0" width="100%">
<TR>
<TD>
<A href="http://openejb.org/">
<IMG hspace="0" src="http://openejb.apache.org/images/logo_openejb.gif" vspace="0">
</A>
</TD>
<TD align="right">
<A href="http://www.apache.org/">
<IMG src="http://www.apache.org/images/asf-logo.gif" width="258" height="66">
</A>
</TD>
</TR>
<TR>
<TD id="page_title">
<!-- $TITLE -->
Source Code
</TD>
<TD align="right">
<BR><BR>
<!-- Google CSE Search Box Begins -->
<FORM id="searchbox_010475492895890475512:_t4iqjrgx90" action="http://www.google.com/cse">
<INPUT type="hidden" name="cx" value="010475492895890475512:_t4iqjrgx90">
<INPUT type="hidden" name="cof" value="FORID:0">
<INPUT name="q" type="text" size="25">
<INPUT type="submit" name="sa" value="Search">
</FORM>
<SCRIPT type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_010475492895890475512:_t4iqjrgx90"></SCRIPT>
<!-- Google CSE Search Box Ends -->
</TD>
</TR>
</TABLE>
<P>
<!-- $BODY -->
<DIV id="PageContent">
<H1><A name="SourceCode-Browsing"></A>Browsing</H1>
<P>You can browse the source code via the <A href="http://svn.apache.org/viewvc/openejb/trunk/" class="external-link" rel="nofollow">web interface</A>.</P>
<H1><A name="SourceCode-Downloading"></A>Downloading</H1>
<P>You can download (aka checkout) the sources of Apache OpenEJB with Subversion client using the following URL <A href="http://svn.apache.org/repos/asf/openejb/trunk/openejb3" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/openejb/trunk/openejb3</A>.</P>
<P>Performing the checkout from the command line using the subversion client is as easy as executing the following command:</P>
<BLOCKQUOTE>
<P>$ svn co <A href="http://svn.apache.org/repos/asf/openejb/trunk/openejb3" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/openejb/trunk/openejb3</A></P></BLOCKQUOTE>
<P>If you are experiencing problems with errors like &quot;400 Bad Request (<A href="http://svn.apache.org/" class="external-link" rel="nofollow">http://svn.apache.org</A>)&quot;, try using:</P>
<BLOCKQUOTE>
<P>$ svn co <A href="https://svn.apache.org/repos/asf/openejb/trunk/openejb3" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/openejb/trunk/openejb3</A></P></BLOCKQUOTE>
<P>or alternatively with Apache Maven 2 or later:</P>
<BLOCKQUOTE>
<P>mvn scm:checkout -DconnectionUrl=scm:svn:<A href="http://svn.apache.org/repos/asf/openejb/trunk/openejb3" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/openejb/trunk/openejb3</A> -DcheckoutDirectory=openejb3</P></BLOCKQUOTE>
<P>It's not yet known how to see the progress of the checkout as mvn scm:checkout checks out the sources non-interactively. It's worth to know about the command, though, as it doesn't require the subversion client.</P>
<H1><A name="SourceCode-Continuousintegration"></A>Continuous integration</H1>
<P>Apache OpenEJB continuous integration relies on <A href="http://ci.apache.org/" class="external-link" rel="nofollow">Apache Buildbot</A>.<BR>
All builders are available <A href="http://ci.apache.org/builders" class="external-link" rel="nofollow">from the page</A>.</P>
<UL>
<LI><A href="http://ci.apache.org/builders/openejb-trunk-ubuntu" class="external-link" rel="nofollow">Apache OpenEJB under Ubuntu</A></LI>
<LI><A href="http://ci.apache.org/builders/openejb-trunk-win-sunjdk" class="external-link" rel="nofollow">Apache OpenEJB under Windows using a Sun/Oracle JDK</A></LI>
<LI><A href="http://ci.apache.org/builders/openejb-trunk-win-ibmjdk6" class="external-link" rel="nofollow">Apache OpenEJB under Windows using an IBM JDK</A></LI>
</UL>
<H1><A name="SourceCode-Building"></A>Building</H1>
<P>To build the code, you'll need to grab a copy of <A href="http://maven.apache.org/" class="external-link" rel="nofollow">Apache Maven</A> version 2.0.4 or later. The standard build command is as follows:</P>
<BLOCKQUOTE>
<P>$ cd openejb3<BR>
$ mvn -Dassemble clean install</P></BLOCKQUOTE>
<P>or alternatively when on Unix-like OSes</P>
<BLOCKQUOTE>
<P>$ cd openejb3<BR>
$ mvn &#45;o &#45;Dmaven.{test,itest}.skip &#45;Dassemble clean install</P></BLOCKQUOTE>
<P>Running with the <B>assemble</B> option turned on enables a profile that builds OpenEJB's assemblies (distros). They live in <B>assembly</B> directory. You can remove it from the command line if you're not interested in them - just remove &#45;Dassemble from the command line and you're ready to go.</P>
<P><B>NOTE:</B> When importing a project into an IDE (Eclipse, NetBeans, IDEA) you should run with the assemble profile on. It's because the assembly modules are only included in the M2 run when the property is set.</P>
<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Solution for a possible OutOfMemoryError</B><BR>It's likely you run into the infamous OutOfMemoryError and the solution is to increase the available memory for Apache Maven. Depending on the system you're working on, the fix can be as easy as <EM>export MAVEN_OPTS=-Xmx512m</EM> on MacOS and Unices or <EM>set MAVEN_OPTS=-Xmx512m</EM> on MS Windows.</TD></TR></TABLE></DIV>
<P>The output of that command should end with &quot;BUILD SUCCESSFUL&quot;</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] OpenEJB ............................................... SUCCESS [3.722s]
[INFO] OpenEJB :: Dependencies ............................... SUCCESS [0.086s]
[INFO] OpenEJB :: Dependencies :: JavaEE API ................. SUCCESS [8.045s]
[INFO] OpenEJB :: iTests ..................................... SUCCESS [0.125s]
[INFO] OpenEJB :: iTests Beans ............................... SUCCESS [9.072s]
[INFO] OpenEJB :: iTests Servlets ............................ SUCCESS [3.372s]
[INFO] OpenEJB :: iTests Client .............................. SUCCESS [8.105s]
[INFO] OpenEJB :: iTests Interceptor Beans ................... SUCCESS [0.578s]
[INFO] OpenEJB :: iTests App ................................. SUCCESS [4.260s]
[INFO] OpenEJB :: iTests Web ................................. SUCCESS [1.110s]
[INFO] OpenEJB :: Container .................................. SUCCESS [0.050s]
[INFO] OpenEJB :: Container :: API ........................... SUCCESS [0.316s]
[INFO] OpenEJB :: Container :: Loader ........................ SUCCESS [1.050s]
[INFO] OpenEJB :: Container :: Java Agent .................... SUCCESS [0.600s]
[INFO] OpenEJB :: Container :: Java EE ....................... SUCCESS [11.098s]
[INFO] OpenEJB :: Container :: Core .......................... SUCCESS [18.659s]
[INFO] OpenEJB :: Container :: Spring ........................ SUCCESS [1.565s]
[INFO] OpenEJB :: Container :: Core :: OSGi .................. SUCCESS [1.285s]
[INFO] OpenEJB :: Container :: Core :: OSGi .................. SUCCESS [1.594s]
[INFO] OpenEJB :: Container :: ActiveMQ4 ..................... SUCCESS [1.169s]
[INFO] OpenEJB :: Container :: JUnit ......................... SUCCESS [1.321s]
[INFO] OpenEJB :: Server ..................................... SUCCESS [0.085s]
[INFO] OpenEJB :: Server :: Client ........................... SUCCESS [1.882s]
[INFO] OpenEJB :: Server :: Core ............................. SUCCESS [1.311s]
[INFO] OpenEJB :: Server :: Multicast Discovery .............. SUCCESS [0.835s]
[INFO] OpenEJB :: Server :: EJBd ............................. SUCCESS [1.102s]
[INFO] OpenEJB :: Server :: Admin ............................ SUCCESS [0.702s]
[INFO] OpenEJB :: Server :: Http ............................. SUCCESS [1.228s]
[INFO] OpenEJB :: Server :: WebAdmin ......................... SUCCESS [1.398s]
[INFO] OpenEJB :: Server :: Telnet ........................... SUCCESS [0.839s]
[INFO] OpenEJB :: Server :: ActiveMQ ......................... SUCCESS [0.475s]
[INFO] OpenEJB :: Server :: CORBA ............................ SUCCESS [0.478s]
[INFO] OpenEJB :: Server :: Derby Network Service ............ SUCCESS [0.643s]
[INFO] OpenEJB :: Server :: Hsql ............................. SUCCESS [0.700s]
[INFO] OpenEJB :: Server :: Webservices ...................... SUCCESS [1.289s]
[INFO] OpenEJB :: Server :: Axis ............................. SUCCESS [1.588s]
[INFO] OpenEJB :: Server :: Axis2 ............................ SUCCESS [9.477s]
[INFO] OpenEJB :: Server :: CXF .............................. SUCCESS [2.384s]
[INFO] OpenEJB :: Examples :: @ApplicationException inheritance SUCCESS [0.535s]
[INFO] OpenEJB :: Examples :: Simple Stateful Pojo ........... SUCCESS [0.312s]
[INFO] OpenEJB :: Examples :: Simple Stateless Pojo .......... SUCCESS [0.163s]
[INFO] OpenEJB :: Examples :: Simple Stateless With Deployment Descriptor SUCCESS [0.123s]
[INFO] OpenEJB :: Examples :: Simple Singleton ............... SUCCESS [0.177s]
[INFO] OpenEJB :: Examples :: Simple MDB Example ............. SUCCESS [0.145s]
[INFO] OpenEJB :: Examples :: Simple MDB Using Deployment Descriptor Example SUCCESS [0.133s]
[INFO] OpenEJB :: Examples :: Simple CMP2 Entity ............. SUCCESS [0.201s]
[INFO] OpenEJB :: Examples :: Simple Webservice .............. SUCCESS [0.523s]
[INFO] OpenEJB :: Examples :: EJB 2.1 Component Interfaces ... SUCCESS [0.162s]
[INFO] OpenEJB :: Examples :: @EJB Injection ................. SUCCESS [0.152s]
[INFO] OpenEJB :: Examples :: @Resource env-entry Injection .. SUCCESS [0.414s]
[INFO] OpenEJB :: Examples :: @Resource DataSource Injection . SUCCESS [0.211s]
[INFO] OpenEJB :: Examples :: @PersistenceContext EntityManager Injection SUCCESS [0.271s]
[INFO] OpenEJB :: Examples :: @Resource javax.jms.ConnectionFactory SUCCESS [0.142s]
[INFO] OpenEJB :: Examples :: Testing Transactions ........... SUCCESS [0.168s]
[INFO] OpenEJB :: Examples :: Testing Security ............... SUCCESS [0.159s]
[INFO] OpenEJB :: Examples :: Testing Security ............... SUCCESS [0.129s]
[INFO] OpenEJB :: Examples :: TestCase Injection ............. SUCCESS [0.148s]
[INFO] OpenEJB :: Examples :: Alternate Descriptors .......... SUCCESS [0.168s]
[INFO] OpenEJB :: Examples :: Ear Testing .................... SUCCESS [0.820s]
[INFO] OpenEJB :: Examples :: Ear Testing :: Business Model .. SUCCESS [0.170s]
[INFO] OpenEJB :: Examples :: Ear Testing :: Business Logic .. SUCCESS [0.168s]
[INFO] OpenEJB :: Examples :: Interceptors ................... SUCCESS [0.193s]
[INFO] OpenEJB :: Examples :: Expanded support for Env Entries SUCCESS [0.207s]
[INFO] OpenEJB :: Examples :: Hello World - Weblogic ......... SUCCESS [0.115s]
[INFO] OpenEJB :: Examples :: JPA with Hibernate ............. SUCCESS [0.248s]
[INFO] OpenEJB :: Examples :: JPA with EclipseLink ........... SUCCESS [0.327s]
[INFO] OpenEJB :: Examples :: Spring Integration ............. SUCCESS [0.309s]
[INFO] OpenEJB :: Examples :: Telephone Stateful Pojo ........ SUCCESS [0.324s]
[INFO] Quartz App ............................................ SUCCESS [0.019s]
[INFO] Quartz Resource Adapter ............................... SUCCESS [0.117s]
[INFO] Quartz Beans .......................................... SUCCESS [0.246s]
[INFO] OpenEJB :: Examples :: Webservice Attachments ......... SUCCESS [0.168s]
[INFO] OpenEJB :: Web Examples :: EJB Examples War ........... SUCCESS [5.999s]
[INFO] OpenEJB :: Web Examples :: EJB WebService ............. SUCCESS [0.293s]
[INFO] OpenEJB :: Examples ................................... SUCCESS [0.086s]
[INFO] OpenEJB :: Web Examples ............................... SUCCESS [0.117s]
[INFO] OpenEJB :: Web Examples :: JSF with MyFaces ........... SUCCESS [3.766s]
[INFO] OpenEJB :: Web Examples :: Struts ..................... SUCCESS [3.711s]
[INFO] OpenEJB :: Web Examples :: EJB WebService ............. SUCCESS [0.462s]
[INFO] OpenEJB :: Web Examples :: EJB WebService with Security SUCCESS [0.328s]
[INFO] OpenEJB :: Web Examples :: EJB WebService with WS-Security SUCCESS [8.771s]
[INFO] OpenEJB :: Examples :: Webservice Inheritance ......... SUCCESS [0.251s]
[INFO] OpenEJB :: Examples :: Transaction Rollback ........... SUCCESS [0.184s]
[INFO] OpenEJB :: Examples :: Troubleshooting ................ SUCCESS [0.298s]
[INFO] OpenEJB :: Assembly ................................... SUCCESS [0.050s]
[INFO] OpenEJB :: Assembly :: WebApp :: Common ............... SUCCESS [0.892s]
[INFO] OpenEJB :: Assembly :: iTests Standalone Client ....... SUCCESS [33.361s]
[INFO] OpenEJB :: Assembly :: Standalone ..................... SUCCESS [1:15.053s]
[INFO] OpenEJB :: Assembly :: Tomcat ......................... SUCCESS [0.082s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Loader ............... SUCCESS [0.375s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Common ............... SUCCESS [2.010s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Catalina ............. SUCCESS [8.560s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Webapp ............... SUCCESS [15.255s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Bundle ............... SUCCESS [44.881s]
[INFO] OpenEJB :: Assembly :: Jetty .......................... SUCCESS [0.267s]
[INFO] OpenEJB :: Assembly :: Jetty :: Loader ................ SUCCESS [0.221s]
[INFO] OpenEJB :: Assembly :: Jetty :: Common ................ SUCCESS [0.455s]
[INFO] OpenEJB :: Assembly :: Jetty :: Webapp ................ SUCCESS [8.406s]
[INFO] OpenEJB :: Assembly :: Webapp ......................... SUCCESS [7.104s]
[INFO] OpenEJB :: Assembly :: Java EE API Libraries .......... SUCCESS [1.787s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 40 seconds
[INFO] Finished at: Sat Jun 19 20:49:51 CEST 2010
[INFO] Final Memory: 153M/338M
[INFO] ------------------------------------------------------------------------
</PRE>
</DIV></DIV>
<H1><A name="SourceCode-Running"></A>Running</H1>
<P>Provided you have successfully built OpenEJB with the assemble option turned on, you can find assemblies in the <B>target</B> directories beneath the <B>assembly</B> directory of each custom assembly. Go to the assembly directory and have a look at its content.</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>jacek@devmac /Users/jacek/oss/openejb3/assembly
$ ls -l
total 8
drwxr-xr-x 6 jacek staff 204 Jun 19 20:49 javaee-api-libs
drwxr-xr-x 6 jacek staff 204 Jun 19 20:46 openejb-itests-standalone-client
drwxr-xr-x 8 jacek staff 272 Jun 19 20:49 openejb-jetty
drwxr-xr-x 9 jacek staff 306 Jun 19 20:47 openejb-standalone
drwxr-xr-x 12 jacek staff 408 Jun 19 20:48 openejb-tomcat
drwxr-xr-x 6 jacek staff 204 Jun 19 20:49 openejb-webapp
drwxr-xr-x 6 jacek staff 204 Jun 19 20:46 openejb-webapp-common
-rw-r--r-- 1 jacek staff 1726 Jun 1 22:51 pom.xml
drwxr-xr-x 4 jacek staff 136 Jun 19 20:46 target
drwxr-xr-x 4 jacek staff 136 Jun 1 22:51 test
</PRE>
</DIV></DIV>
<P>The most common choice is to go to openejb-standalone which is exactly what the name stands for - it lets you get OpenEJB up and running from a command line with no additional configuration - in other words you can play with your EJBs right away. Looking at the <B>openejb-standalone/target</B> directory reveals the tar.gz'ed and zip'ed distributions. Unpack one and give it a go.</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>jacek@devmac /Users/jacek/oss/openejb3/assembly/openejb-standalone/target
$ jar -xvf openejb-3.2-SNAPSHOT.zip
created: openejb-3.2-SNAPSHOT/
...
jacek@devmac /Users/jacek/oss/openejb3/assembly/openejb-standalone/target
$ cd openejb-3.2-SNAPSHOT
jacek@devmac /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
$ chmod +x ./bin/openejb
jacek@devmac /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
$ ./bin/openejb start
ERROR - Logging may not operate as expected. The directories for the following files do not exist so no file can be created. See the list below.
ERROR - [0] /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT/conf/logs/transaction.log
ERROR - [1] /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT/conf/logs/openejb.log
Apache OpenEJB 3.2-SNAPSHOT build: 20100619-08:45
http://openejb.apache.org/
log4j:WARN No appenders could be found for logger (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).
log4j:WARN Please initialize the log4j system properly.
[init] OpenEJB Remote Server
Jun 19, 2010 9:00:58 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
** Starting Services **
NAME IP PORT
httpejbd 127.0.0.1 4204
admin thread 127.0.0.1 4200
ejbd 127.0.0.1 4201
ejbd 127.0.0.1 4203
hsql 127.0.0.1 9001
telnet 127.0.0.1 4202
-------
Ready!
</PRE>
</DIV></DIV>
<P>There's another, slightly less error-prone approach using a shell script - <EM>try.sh</EM> - that's tailor-made for that particular task - running OpenEJB 3 right after it's been built locally. No need to remember these aforementioned steps but the mere name of the script itself</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>jacek@devmac /Users/jacek/oss/openejb3/assembly/openejb-standalone
$ ./try.sh
x openejb-3.2-SNAPSHOT/lib/xmlsec-1.4.3.jar
...
ERROR - Logging may not operate as expected. The directories for the following files do not exist so no file can be created. See the list below.
ERROR - [0] /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT/conf/logs/transaction.log
ERROR - [1] /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT/conf/logs/openejb.log
Apache OpenEJB 3.2-SNAPSHOT build: 20100619-08:45
http://openejb.apache.org/
2010-06-19 21:09:35,780 - INFO - openejb.home = /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
2010-06-19 21:09:35,782 - INFO - openejb.base = /Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
...
2010-06-19 21:09:53,376 - INFO - [Server@230cc23b]: [Thread[main,5,main]]: checkRunning(false) entered
2010-06-19 21:09:53,376 - INFO - [Server@230cc23b]: [Thread[main,5,main]]: checkRunning(false) exited
** Starting Services **
NAME IP PORT
httpejbd 127.0.0.1 4204
admin thread 127.0.0.1 4200
ejbd 127.0.0.1 4201
ejbd 127.0.0.1 4203
2010-06-19 21:09:54,475 - INFO - [Server@230cc23b]: Initiating startup sequence...
2010-06-19 21:09:54,479 - INFO - [Server@230cc23b]: Server socket opened successfully in 1 ms.
2010-06-19 21:09:54,651 - INFO - [Server@230cc23b]: Database [index=0, id=0, db=file:/Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT/data/hsqldb/hsqldb, alias=hsqldb] opened sucessfully in 171 ms.
2010-06-19 21:09:54,651 - INFO - [Server@230cc23b]: Startup sequence completed in 175 ms.
2010-06-19 21:09:54,656 - INFO - [Server@230cc23b]: 2010-06-19 21:09:54.656 HSQLDB server 1.8.0 is online
2010-06-19 21:09:54,656 - INFO - [Server@230cc23b]: To close normally, connect and execute SHUTDOWN SQL
2010-06-19 21:09:54,656 - INFO - [Server@230cc23b]: From command line, use [Ctrl]+[C] to abort abruptly
hsql 127.0.0.1 9001
telnet 127.0.0.1 4202
-------
Ready!
</PRE>
</DIV></DIV>
<P>The old 2 finger salute - Ctrl-C - stops the OpenEJB instance.</P>
<H1><A name="SourceCode-Debugging"></A>Debugging</H1>
<P>Once you have built the source, you may debug it by starting OpenEJB with debug options. There are essentially two modes of operation.</P>
<P>Debug without suspending, so that the server can fully start up, and be debugged at any point you wish. If you are in the directory where you extracted the assembly to, just issue the following command...</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>jacek@devmac Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
$ OPENEJB_OPTS=&quot;-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001&quot; ./bin/openejb start
</PRE>
</DIV></DIV>
<P>Debug and suspend until a debugger has been attached. This is helpful if the code that is to be debugged happens to be some of the startup code. The following command would achieve this mode...</P>
<DIV class="preformatted panel" style="border-width: 1px;"><DIV class="preformattedContent panelContent">
<PRE>jacek@devmac Users/jacek/oss/openejb3/assembly/openejb-standalone/target/openejb-3.2-SNAPSHOT
$ OPENEJB_OPTS=&quot;-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001&quot; ./bin/openejb start
</PRE>
</DIV></DIV>
<P>Once either mode is started, just attach your favourite development IDE or debugger, and away you go.</P>
</DIV>
</P>
</TD>
<TD class="Col4"><IMG src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">
</TD>
</TR>
<TR class="Row5">
<TD class="Col1">&nbsp;</TD>
<TD class="Col2">&nbsp;</TD>
<TD class="Col3">
<BR>
<BR>
<IMG width="100%" height="1" src="http://openejb.apache.org/images/line_light.gif">
<TABLE width="100%">
<TR>
<TD>
<SPAN class="bodyGrey">
<SMALL>
<NOTICE><!-- $FOOTER -->
Apache OpenEJB is an project of The Apache Software Foundation (ASF)
</NOTICE>
<BR>
Site Powered by
<A href="http://atlassian.com/">Atlassian</A>
<A href="http://atlassian.com/confluence/">Confluence</A>
.
</SMALL>
</SPAN>
</TD>
<TD align="right">
<A style="color:#999;font-size:small;font-weight:normal;" href="https://cwiki.apache.org/confluence/pages/editpage.action?spaceKey=OPENEJB&title=Source%20Code">[ edit ]</A>
</TD>
</TR>
</TABLE>
<BR>
</TD>
<TD class="Col4"><IMG src="http://openejb.apache.org/images/dotTrans.gif"></TD>
<TD class="Col5">&nbsp;</TD>
</TR>
</TABLE>
<!-- Needed for composition plugin -->
<!-- delay the loading of large javascript files to the end so that they don't interfere with the loading of page content -->
<SPAN style="display: none">
<SCRIPT type="text/javascript" language="JavaScript" src="http://cwiki.apache.org/confluence/labels-javascript"></SCRIPT>
<SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</SCRIPT>
<SCRIPT type="text/javascript">
_uacct = "UA-2717626-1";
urchinTracker();
</SCRIPT>
</SPAN>
</BODY>
</HTML>