if you can deal without the PB API having transaction manager support (only ODMG right
now) then you can do it; however if you need PB you should wait a couple days, I
believe Armin is working on putting that back in right now.
Once that is done, however, the integration is a lot smoother.
Here are some instructions for OJB use in Jboss 3.x
1. If you are lazy like me, put your OJB.properties and repository files in
/jboss-tomcat/bin
2. in the jboss-service.xml add the following XML at the end
<mbean code="org.jboss.ojb.odmg.ODMGFactory"
name="DefaultDomain:service=ODMG,name=ojb/defaultODMG">
<attribute name="JndiName">ojb/defaultODMG</attribute>
</mbean>
<mbean code="org.jboss.ojb.pb.PBFactory"
name="DefaultDomain:service=PB,name=ojb/PBAPI">
<attribute name="JndiName">ojb/PBAPI</attribute>
</mbean>
3. put the OJB jar, and the dependent run-time jars in server/default/lib
4. in the OJB.properties, you have to do the following:
#ConnectionFactory / Default ConnectionPool
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPassThroughImpl
useAutoCommit=0
ignoreAutoCommitExceptions=true
IF you are using head, you'll need the following (added after 0.9.6 went out)
#----------------------------------------------------------------------------------------
# Transaction Management and assocation
#----------------------------------------------------------------------------------------
# Use the LocalTxManager if you want the transaction to be associated by a thread
#OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
# Use the JTATxManager if you want the transaction to be associated via the
Transaction
# manager that is in your application server.
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
#
# The TransactionManager is acquired in different ways dependent on the application
server.
# The JTATransactionManagerClass property allows you to specify the class that
implements
# the proper behaviour for finding the transaction manager.
#
# JBoss Transaction Manager Factory
JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.JBossTransactionManagerFactory
# Weblogic Transaction Manager Factory
#JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.WeblogicTransactionManagerFactory
# WebSphere transaction manager factory
#JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.WebSphereTransactionManagerFactory
5. if you want to test, build Armin's ejb; from the root of your jakarta-ojb project
type "ant -buildfile build-xdoclet.xml". the jar file for the bean will be generated
into jakarta-ojb\target\srcejb, grab it and put it in the deploy directory for jboss.
Put the appropriate HSQLDB Scripts in \server\default\db\hypersonic
you'll also need to build a datasource for the connection (which is very similar to
the one that ships with JBoss for OJB, but has the following at the end
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic">
<attribute name="Port">1476</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Database">OJB</attribute>
<attribute name="Trace">false</attribute>
</mbean>
note the database is OJB
No RAR yet, but I can assure we are making progress, and that progress will speed up
dramatically in the next week. The nice thing is you don't have to worry about a
subclass of persistencebroker or anything like that it's all handled magically.
cheers,
Matthew
btw, that was a $100 dollar kludge, not no free kludge! ;)
-----Original Message-----
From: Ryan Marsh [mailto:[EMAIL PROTECTED]]
Sent: Mon 9/30/2002 11:38 PM
To: OJB Users List
Cc:
Subject: 0.9.6 and JBoss
I haven't upgraded OJB in a while, the instance I have is a nasty kludge
that Matt helped me put together. I'd like to put 0.9.6 in JBoss, is it
still as convoluted? I haven't kept up with the lists that much so I
don't really know what has changed. There still isn't a rar is there?
How do I install 0.9.6 in JBoss 3?
-ryan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
<<winmail.dat>>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
