Dne sobota 07 julij 2001 04:25 ste napisali:
> Jure, sorry if you see this twice, sourceforge has decided to not like
> my mail account so I've sent this directly to you in addition to trying
> to send to the list.
>
> If you look at the server.log file in the log directory, you should see
> the server-side version of that stack trace. That should tell us more of
> what is going on when this fails.
>
> thanks,
> danch
>


Maybe you've hit the problem now. There is no server side stack trace. No 
exception is logged in the server console.

calling rollback on the user transaction or on the datasource conenction 
object throws an exception on the client, but nothing happens on the server...


Jure

> Jure Lodrant wrote:
> > D
> >
> >>> setRollbackOnly is used in EJB's using Container managed transactions
> >>> which is not the case here.
> >>
> >> If you're trying to do Bean managed transactions, you need to read up on
> >> how to do it. See section 11.3.3 of the EJB 1.1 spec, or section 17.3.3
> >> of the EJB 2.0 pfd 2 spec.
> >>
> >> In short, you need to use a UserTransaction object that you get from
> >> your EJBContext. Note that the example in the 2.0 spec won't work in
> >> JBoss at the moment - you need to begin the transaction before getting
> >> your connections.
> >>
> >> -danch
> >
> > There must be something I'm doing terribly wrong.
> >
> > I redid the example per your suggestion, using JTA transactions and still
> > I seem to be having the one and only problem:
> >
> > My new example looks like this:
> > --------------------------------------------------------
> > public void ship (String productId, String orderId, int quantity) {
> >
> >     UserTransaction ut = context.getUserTransaction();
> >       try {
> >
> >      ut.begin();
> >          updateOrderItem(productId, orderId);
> >          updateInventory(productId, quantity);
> >          ut.commit();
> >       } catch (Exception ex) {
> >           try {
> >               System.out.println("Cause:" + ex.getMessage());
> >             ut.rollback();
> >              throw new EJBException("Transaction failed: " +
> > ex.getMessage()); } catch (Throwable sqx) {
> >               throw new EJBException("Rollback failed: " +
> > sqx.getMessage()); }
> >       }
> >    }
> > ---------------------------------------------------------
> > While the transaction is commiting, all looks well. When an application
> > exception occurs and rollback is called, I get this:
> > -----------------------------------------------------
> > RemoteException occurred in server thread; nested exception
> > is:
> >         java.rmi.ServerException: Transaction rolled back
> > java.rmi.ServerException: RemoteException occurred in server thread;
> > nested exception is:
> >         java.rmi.ServerException: Transaction rolled back
> > java.rmi.ServerException: Transaction rolled back
> >         at
> > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemo
> >teCall.java:248) at
> > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
> >         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
> >         at
> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknow
> >n Source)
> >         at
> > org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Statel
> >essSessionProxy.java:188) at $Proxy1.ship(Unknown Source)
> >         at warehouse.test.WarehouseClient.main(WarehouseClient.java:37)
> > ----------------------------------------------------
> > And the transaction remains open and eventually timeouts....
> >
> > No clue again. Should go back to school I guess...
> >
> >
> > Please help me out here,
> >
> > Jure
> >
> >> _______________________________________________
> >> JBoss-user mailing list
> >> [EMAIL PROTECTED]
> >> http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to