Bugs item #951472, was opened at 2004-05-10 16:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=951472&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel Ruoso (ruoso)
Assigned to: Nobody/Anonymous (nobody)
Summary: More than one entity found exception raised with subclasses

Initial Comment:
Hi,

I have one CMP EJB called Account, and I have
descendant EJBs called AccountMoney, AccountPayCheck,
AccountCreditCard. These EJBs are java subclasses from
the AccountBean class, and the tables inherits the
Account table.

Here's the problem.

I have two session beans, one named CtrlPayCheck and
other name CtrlAccounts. The CtrlPayCheck needs to
findByPrimaryKey on an AccountPayCheck EJB, and invoke
a method in CtrlAccounts to operate on the "generic"
Account.

When the second session bean (CtrlAccounts) tries to
findByPrimaryKey the same account (as AccountLocal)
that the first session bean (CtrlPayCheck) accessed (as
AccountPayCheckLocal), a "More than one entity matches
the find criteria" exception. In fact, the field used
in the finder *is* the primary key of the account
table. And there is *only one* entity that matches the
find criteria...

Possible cause:

I think when the CMP container instantiates the
AccountPayCheck EJB it sees that it must check the
idAccount field into Account table, but store that
information as an AccountPayCheck. which in fact *is*
an Account.
Then, when the container goes to instantiate the
Account EJB, it gets from the database (as he never
retrtieved an Account Bean) and sees that the
AccountnPayCheck is a Account too, so it finds two
entities, and not just one. Even they being the same
entity.

I've never looked at Jboss's source code, and I
actually don't have a clue of where to look at. This
problem is really urgent to me, as it's stopping an
online situation... Hope there is a workaround before
the fix is released.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=951472&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to