#634 CMR setter bug ?

Hi all

When using CMR field, the setter method has to accept an local EJB interface
of the entity bean as a parameter. but IDEA complains that "CMR field
setter should have parameter of type 'null' ".

Isn't a bug ??

Lakshmanan



3 comments
Comment actions Permalink

Hello Lakshmanan,
Could you please send me in your ejb-jar.xml where CMR field offended was
declared ?
It seems something wrong with relationship declaration there.
Thank you for report.

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Lakshman" <nslax@hotmail.com> wrote in message
news:agjd9k$9gg$1@is.intellij.net...

Hi all

>

When using CMR field, the setter method has to accept an local EJB

interface

of the entity bean as a parameter. but IDEA complains that "CMR field
setter should have parameter of type 'null' ".

>

Isn't a bug ??

>

Lakshmanan

>
>
>


0
Comment actions Permalink

Hi,
Thanks for that reply. Here is how i do the CMR.

I have two entity beans, EBTeamBean and EBGroupBean. Actually every team
belongs to a group. So, i have an EBGroup (EJB interface of EBGroupBean) as
a CMR field inside EBTeamBean.

So, in the EBTeamBean, i have the following abstract methods.

public abstract EBGroup getGroup();
public abstract void setGroup(EBGroup grp);


In the ejb-jar.xml (I use an existing ejb-jar.xml which is working fine
with weblogic 6.1 rather than creating one using IDEA), i have the following
relationship defined.

Team-Group Team-Belongs-Group many EBTeamBean group Group-Has-Team one EBGroupBean Behaviour in IDEA. The ejb-jar is parsed fine and the EJB window shows all the CMP and CMR fields correctly. Clicking on the getter and setter function takes me to the corresponding EBTeamBean.java file correctly. But, In the java file, the the setter gives me an error saying "CMR field setter should have parameter of type 'null' " Do you think is there a problem in my xml... ?? Thanks for your interest. Lakshmanan "Alexey Kudravtsev" ]]> wrote in message
news:agjve6$pf3$1@is.intellij.net...

Hello Lakshmanan,
Could you please send me in your ejb-jar.xml where CMR field offended was
declared ?
It seems something wrong with relationship declaration there.
Thank you for report.

>

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>

"Lakshman" <nslax@hotmail.com> wrote in message
news:agjd9k$9gg$1@is.intellij.net...

Hi all

>

When using CMR field, the setter method has to accept an local EJB

interface

of the entity bean as a parameter. but IDEA complains that "CMR field
setter should have parameter of type 'null' ".

>

Isn't a bug ??

>

Lakshmanan

>
>
>

>
>


0
Comment actions Permalink

Hello Lakshman,
Number of bugs were fixed in build #635, including correct ejb error
highlighting, and your example works ok with it (assuming that EBGroup is a
local interface)
Please try this build out when it will be available
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Lakshman" <nslax@hotmail.com> wrote in message
news:aglfau$2jh$1@is.intellij.net...

Hi,
Thanks for that reply. Here is how i do the CMR.

>

I have two entity beans, EBTeamBean and EBGroupBean. Actually every team
belongs to a group. So, i have an EBGroup (EJB interface of EBGroupBean)

as

a CMR field inside EBTeamBean.

>

So, in the EBTeamBean, i have the following abstract methods.

>

public abstract EBGroup getGroup();
public abstract void setGroup(EBGroup grp);

>
>

In the ejb-jar.xml (I use an existing ejb-jar.xml which is working fine
with weblogic 6.1 rather than creating one using IDEA), i have the

following

relationship defined.

>

<ejb-relation>
<ejb-relation-name>Team-Group</ejb-relation-name>
<ejb-relationship-role>

>
>
<ejb-relationship-role-name>Team-Belongs-Group</ejb-relationship-role-name>

<multiplicity>many</multiplicity>
<relationship-role-source>
<ejb-name>EBTeamBean</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>group</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>

>

<ejb-relationship-role-name>Group-Has-Team</ejb-relationship-role-name>
<multiplicity>one</multiplicity>
<relationship-role-source>
<ejb-name>EBGroupBean</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>

>

Behaviour in IDEA.

>

The ejb-jar is parsed fine and the EJB window shows all the CMP and CMR
fields correctly. Clicking on the getter and setter function takes me to
the corresponding EBTeamBean.java file correctly. But, In the java file,
the the setter gives me an error saying "CMR field setter should have
parameter of type 'null' "

>

Do you think is there a problem in my xml... ??

>

Thanks for your interest.

>

Lakshmanan

>
>
>

"Alexey Kudravtsev" <cdr@intellij.com> wrote in message
news:agjve6$pf3$1@is.intellij.net...

Hello Lakshmanan,
Could you please send me in your ejb-jar.xml where CMR field offended

was

declared ?
It seems something wrong with relationship declaration there.
Thank you for report.

>

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>

"Lakshman" <nslax@hotmail.com> wrote in message
news:agjd9k$9gg$1@is.intellij.net...

Hi all

>

When using CMR field, the setter method has to accept an local EJB

interface

of the entity bean as a parameter. but IDEA complains that "CMR field
setter should have parameter of type 'null' ".

>

Isn't a bug ??

>

Lakshmanan

>
>
>

>
>

>
>


0

Please sign in to leave a comment.