I have attached a mail that I kept from the archive that deals with this. I haven't read it in detail so can't vouch for the quality of content.
HTH
Tim
-----Original Message-----
From: Arijit Ghosh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 28, 2002 6:27 AM
To: [EMAIL PROTECTED]
Subject: OJB 0.9.7 + Jboss 3.0
Hi,
I am using Jboss 3.0 with Tomcat 4.0.3 and would like to integrate OJB
0.9.7 (the latest release) with it.
How do I go about it ?
What parameters to change in OJB.properties and repository.xml file ?
What classpath issues to be taken care of ?
Is there any known BUG ?
0.9.5 seems to have some problem with Jboss 3.0
Has it been resolved ? Where can I see the list of known BUGS when
integrated with Jboss ?
Thanks,
Arijit
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
------------------------------------------------------------------------------ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courriel est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser imm�diatement, par retour de courriel ou par un autre moyen. ====================================================
--- Begin Message --- Title: [j2ee deployment] my howtoPhil Warrick wrote:
> I'm getting close to finally getting the cvs head ejb examples to work
> with a remote client (more on the pain involved with the
> build-xdoclet.xml file and creating a client perhaps later).For anyone interested, I'll mention what I needed to do do get a remote
client working with the sample ejb bean PBClient in jboss. Excuse me if
some of this is obvious to some of you: it wasn't obvious to me :) Hope
it fills in some gaps in the docs for somebody and helps the evolution
of the build scripts.Configuration: Win2K, hsqldb, jBoss 3.0.3, ojb cvs head
1) Build source with
bin\build jar2) Build ejb beans with
ant -buildfile build-xdoclet.xmlAs I mentioned in a previous email, this command gave me unresolved
symbol messages during code generation of the following type:[ejbdoclet]
C:\eclipse\workspace\jakarta-ojb_cvs\src\ejb\org\apache\ojb\ejb\Pers
onArticleManagerODMGBean.java:122: cannot resolve symbol
[ejbdoclet] symbol : class ArticleManagerODMGLocal
[ejbdoclet] location: class org.apache.ojb.ejb.PersonArticleManagerODMGBean
[ejbdoclet] private ArticleManagerODMGLocal am;After looking at the xdoclet archives, these message are common for
certain configurations, but they can be ignored because the code is
getting generated. A look at the destination directory target/srcejb
confirms this.A more serious problem is that the above errors prevent target
compile_beans from starting. So I removed the xdoclet dependency from
that target and ran it explicitly:ant -buildfile build-xdoclet.xml compile_beans
This wouldn't compile unless the dist jars were on the class path, so I
added that to path id ojb.classpath (although I don't know why
build.dest and build.desttest aren't enough):<path id="ojb.classpath">
<pathelement path="${build.dest}"/>
<pathelement path="${build.desttest}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<!-- added this fileset-->
<fileset dir="${dist}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>This created target\srcejb\ojb_beans.jar (maybe should be put in a
different directory like dist?)3) Build the ejb clients:
Added a target to build-xdoclet.xml<target name="jar_clients" depends="compile_beans_and_clients">
<jar jarfile="${jar.dir}/${clientjar.name}.jar"
basedir="${generated.ejb.classes.dir}"
excludes="**/*Bean.class,
**/*BO.class,
**/*BeanImpl.class,
**/*.xml,
**/*.properties" />
</target>to create ojb_beans_clients.jar with the required client classes and
configuration files META-INF\jboss.xml and META-INF\ejb-jar.xml4) Deploy jakarta-ojb.sar to jboss
I modified slightly the sar file that Mickey posted in a previous email:a) added all the latest lib\*.jar files excluding hsqldb.jar since jboss
has this alreadyb) ensured that the following OJB.properties were set
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
ryPassThroughImpl
useAutoCommit=0
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.JBossT
ransactionManagerFactoryPersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.Persiste
ntFieldPropertyImpl
(Note the change in path in last setting since last release)Deployed this file to ...\jboss-3.0.3\server\default\deploy\ojb
c) in repository.xml set the jdbc conn descriptor to hsqldb settings
required for use in jboss:<jdbc-connection-descriptor
platform="Hsqldb"
jdbc-level="2.0"
jndi-datasource-name="java:DefaultDS"
username="sa"
password=""
eager-release="true"
/>
5) Deploy ojb_beans.jar file to jboss
in the directory ...\jboss-3.0.3\server\default\deploy\ojbNote that simply putting these two jar files in
...\jboss-3.0.3\server\default
caused deploy order problems for me although others do not report this
problem
6) Deploy ojb test hsqldb database to jboss
After creating the database with
bin\build prepare-testdbTake the generated OJB.script file from .../target/test
and rename the file to default.script.
Replace the jboss default.script file in
...\jboss-3.0.3\server\default\db\hypersonic
with this file.7) Run jboss
8) Run client org.apache.ojb.ejb.AllTests
Numerous jars are required for the client. I modified build.bat
to set this up properly and called it ".\runEJBClient.bat"@echo off
REM Please let JAVA_HOME point to your JDK base directory
if "%JAVA_HOME%" == "" set JAVA_HOME=C:\j2sdk1.4.0
set JAVA=%JAVA_HOME%\bin\java
set JBOSS_HOME=C:\jboss\jboss-3.0.3
set cp=
for %%i in (%JBOSS_HOME%\client\*.jar) do call bin\cp.bat %%i
for %%i in (dist\*.jar) do call bin\cp.bat %%i
for %%i in (lib\*.jar) do call bin\cp.bat %%i
"%JAVA%" -classpath "target\srcejb\ojb-beans-clients.jar;%CP%"
org.apache.ojb.ejb.AllTestsThat's it.
Phil
--
--- End Message ---
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
