Hi,
I guess you use bean managed persistence here.
Older jBoss versions had a problem with application
exceptions from create home methods being converted
to CreateException, but that should be history now.
What is the superclass of DuplicateVCCNameException?
How is the transaction declaration of your create()
method, and is it called in the context of a transaction?
Best Regards,
Ole Husgaard.
Darius Davidavicius wrote:
>
> Yes sure it is declared:
>
> public interface VirtualCallCenterHome extends EJBHome
> {
>
> public VirtualCallCenter create(String inVCCName,
> String inDescription)
> throws RemoteException,
> CreateException,
> DuplicateVCCNameException;
> ....
> }
>
> /**
> Implementation
> I throw DuplicateVCCNameException just in the start of ejbCreate function
> And still getting TRANSACTION ROLLBACK EXCEPTION instdead of
>DuplicateVCCNameException
> */
> public VirtualCallCenterPK ejbCreate( String inVCCName,
> String inNotes
> )
> throws CreateException,
> DuplicateVCCNameException
>
> {
> log("VCCBean::ejbCreate(...)",theLogLevel );
> String error = "VCCBean::ejbCreate: TEst";
> throw new DuplicateVCCNameException (error);
> }
>
> On Thu, 9 Nov 2000 18:43:05 +1030 (CST), Tom Cook wrote:
>
> >Darius Davidavicius writes:
> > > Hi all,
> > >
> > > I using beta prod3 (the same problem was and with prod2)
> > >
> > > I have EntiryBean ejbCreate function where i inserting data into oracle by name
>(inVCCName)
> > > I have constraint on the table and it allows just unique names
> > > Currently running version (Weblogic) thows SQLException where i can check if not
>unique name i was trying to insert.
> > > first function call ::ejbCreate ("XXX", "Notes1") works fine
> > >
> > > second call of ::ejbCreate ("XXX", "Notes2") works strange:
> > > I catch java.sql.SQLException and i want to throw my DuplicateVCCNameException
>but instead of it i do getting TRANSACTION ROLLBACK EXCEPTION
> > >
> > > Why it is so?
> >
> >This is what the EJB spec specifies should happen in the case of a
> >bean implementation throwing a runtime exception (I don't recall the
> >section exactly). Is your exception declared in the throws clause of
> >the create method of the home interface?
> >
> >Tom
> >
> >
> >--
> >--------------------------------------------------------------
> >To subscribe: [EMAIL PROTECTED]
> >To unsubscribe: [EMAIL PROTECTED]
> >Problems?: [EMAIL PROTECTED]
> >
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]