Not sure what you mean. The exception thrown is a RemoteException on the
first call of 

unit.addComponent(component, dateRa);

so would I have to catch this and throw a different type of Exception? I
don't really want to take care of rollbacks myself. I've tried this but to
with no luck:

public void addUnitAndComponents(BusinessUnitProps props,
        BusinessUnit unit = null;
        try{
            unit = buHome.create(props);
        
        Iterator iter = compToDateRa.keySet().iterator();
        while(iter.hasNext()){
            BusinessComponent component = (BusinessComponent)iter.next();
            java.util.Date [] dateRa = (java.util.Date
[])compToDateRa.get(component);
            unit.addComponent(component, dateRa);
        }
        }catch (RemoteException e){
            throw new CreateException (e.toString());}
    
   }

Any ideas?

Regards

Robert Hargreaves
-----Original Message-----
From: Jochen Strunk [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2000 13:04
To: Orion-Interest
Subject: Re: Do transactions work at all with Orion?

No, its not. Same mistake we made.
Look at the spec, 12.1.2. Your example should work if you throw a runtime 
exception that is
not declared in the throws clause of your method (e.g. EJBException) 
instead of the RemoteException, otherwise you have to take care of the 
rollback yourself.

--jochen strunk

) Jochen Strunk
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665402, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de

Reply via email to