This is a big hole in the documentation. I don't know when it will be
fixed, but perhaps for the SP2 release notes.
Anyway, there's some work to do to get the JSP Transaction tag to work,
which is not documented except if you happened to stumble across the Readme,
jar file and Makefile in $JRUN_HOME/samples/taglib. If you look there, and
extrapolate from the exception you're getting, what you'll see is that the
JSP transactions are implemented through an entity bean named Txn. If that
bean is not deployed into the EJB server, and if your datasources aren't
defined in the deploy.properties for that EJB, then the JSP transaction tag
won't work. It makes sense, since to support distributed transactions in
JSP you really need to do it through the EJB server. But it would've made
better sense, for JRun at least, to pre-deploy that EJB for you so I
wouldn't have to explain it and you wouldn't have to run into this problem.
:->
Does this help you enough? Read the Readme and the deploy.properties in
that taglib dir. Copy the deploy.properties (after adding your datasource
definitions) and the jrunbeans.jar to your server's deploy directory, and
then deploy it. Or just read the files, edit the deploy.properties to add
the datasources, and run the makew/Makefile, which will copy and deploy the
files for you.
If you have more exceptions then, please let me know.
Scott Stirling
Allaire
-----Original Message-----
From: Brian Zimmer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 12:54 PM
To: JRun-Talk
Subject: TransactionTag and TxnHome
I am trying to wrap the <sql/> in a <transaction/> for normal sql
statement, we're not using EJBs or message queues. I can successfully
execute the sql, but if an exception occurs the <sql/> does not rollback
or release the connection to the db (Informix, and I can see the
connection still open). I followed the example in the taglib.pdf for
using the <transaction/> but can't get it to work. I added the ejb
service since that's how the java:comp/UserTransaction gets bound, but I
still get an exception trying to use the <transaction/> with the <sql/>
because the <transaction/> fails to find TxnHome . I really need
rollback to happen on a SQLException so using this tag appears
imperative. Can someone point me in the right direction?
The JSP code:
<jrun:transaction>
<jrun:sql datasrc="<%= datasrc() %>">
delete from role where role_id in <%buffer.toString() %>;
</jrun:sql>
</jrun:transaction>
The exception:
Message: TxnHome not found
javax.servlet.jsp.JspTagException: TxnHome not found
at
allaire.taglib.TransactionTag.doStartTag(TransactionTag.java:112)
at
jrun__admin__role__role_list2ejsp19._jspService(jrun__admin__role__role_
list2ejsp19.java:210)
at
allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.jav
a:34)
at
allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher
...java:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:367)
at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
thanks,
brian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists