Hi Ole Husgaard,
Here are answers to your questions - maybe it can help you undersand whant is going on.
As I mentioned before - this bean is running under Weblogic application server witout
problems.
On Thu, 09 Nov 2000 19:30:00 +0100, Ole Husgaard wrote:
>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.
I have tested it on JBoss2 -beta-03 and JBoss2 -beta-04
>
>What is the superclass of DuplicateVCCNameException?
public class DuplicateVCCNameException extends DialogException
public class DialogException extends Exception
>
>How is the transaction declaration of your create()
>method, and is it called in the context of a transaction?
>
Transaction atribute of the bean:
<trans-attribute>Required</trans-attribute>
In the client i calling ::create function without client defined transaction:
aCenter = (VirtualCallCenter) PortableRemoteObject
.narrow(aVCCHome.create("XXX", "Notes
"),
VirtualCallCenter.class);
Thanks in advance for any help,
Darius Davidavicius
>
>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]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]