[JBoss-user] [Persistence & CMP/JBoss] - Re: IllegalStateException while removing entities in CMR.

2004-04-03 Thread ebrain13
According to Specs.
anonymous wrote : 10.3.6.1 Use of the java.util.Collection API to Update Relationships
  | The Bean Provider should exercise caution when using an Iterator over a collection 
in a container-managed relationship. In particular, the Bean Provider should not 
modify the container-managed collection while the iteration is in progress in any way 
that causes elements to be added or removed, other than by the 
java.util.Iterator.remove() method. If elements are added or removed from the 
underlying container-managed collection used by an iterator other than by the 
java.util.Iterator.
  | remove() method, the container should throw the java.lang.IllegalStateException on 
the next operation on the iterator.

I would suggest for CMR collections, if you want to modify them while iterating 
around, make a copy of the CMR Collection and then modify it.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829024#3829024

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829024


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: IllegalStateException while removing entities in CMR.

2004-04-03 Thread loubyansky
What is the method code that fails? So far it works for me with these relationships 
and the data.
If you have a testcase you can submit a bug report on sf.net/projects/jboss. Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829007#3829007

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829007


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: IllegalStateException while removing entities in CMR.

2004-03-30 Thread richaosu
I have an example project. It contains the source, dataset, and exploded EAR. It is a 
self-contained, zipped Eclipse project. How can I send it to you?

Question: When I look at the getIdList() method of the RelationSet class in package 
org.jboss.ejb.plugins.cmp.jdbc.bridge, I see the exception is thrown when setHandle[0] 
is null.  IF this is a list of my D entites, then is the exception thrown because I 
have no D entities (In my example, I remove the D entities before the parant C 
entity)? If so, how can I remove a C entity?

As requested here is the sample dataset using Hypersonic SQL:

  | create table TABLE_A
  | (
  |TABLE_A_ID   VARCHAR(2)  not null,
  |VALUE_A1 VARCHAR(16),
  |primary key (TABLE_A_ID)
  | );
  | create table TABLE_B
  | (
  |TABLE_B_ID   VARCHAR(2)  not null,
  |TABLE_A_ID   VARCHAR(2),
  |VALUE_B1 VARCHAR(8),
  |primary key (TABLE_B_ID)
  | );
  | create table TABLE_C
  | (
  |TABLE_C_ID   VARCHAR(2)  not null,
  |TABLE_A_ID   VARCHAR(2),
  |VALUE_C1 VARCHAR(8),
  |primary key (TABLE_C_ID)
  | );
  | create table TABLE_D
  | (
  |TABLE_D_ID   VARCHAR(2)  not null,
  |TABLE_C_ID   VARCHAR(2),
  |VALUE_D1 VARCHAR(8),
  |primary key (TABLE_D_ID)
  | );
  | 
  | alter table TABLE_B add constraint TABLE_B_FK1 foreign key (TABLE_A_ID) references 
TABLE_A;
  | alter table TABLE_C add constraint TABLE_C_FK1 foreign key (TABLE_A_ID) references 
TABLE_A;
  | alter table TABLE_D add constraint TABLE_D_FK1 foreign key (TABLE_C_ID) references 
TABLE_C;
  | 
  | insert into TABLE_A values ('a1', 'value_a1');
  | insert into TABLE_B values ('b1', 'a1', 'value_b1');
  | insert into TABLE_B values ('b2', 'a1', 'value_b2');
  | insert into TABLE_C values ('c1', 'a1', 'value_c1');
  | insert into TABLE_C values ('c2', 'a1', 'value_c2');
  | insert into TABLE_D values ('d1', 'c1', 'value_d1');
  | insert into TABLE_D values ('d2', 'c2', 'value_d2');
  | insert into TABLE_D values ('d3', 'c2', 'value_d3');
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828156#3828156

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828156


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: IllegalStateException while removing entities in CMR.

2004-03-29 Thread loubyansky
To reproduce this I would need not only the relationship specification but also some 
real initial data. Could you please provide it? Thanks.

http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827866#3827866";>View 
the original post

http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827866>Reply 
to the post


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user