cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying an EJB in NWDI

Former Member
0 Kudos

I created an EJB Module DC, defined and coded a session bean, and activated the DC. I checked it out for further editing. I wanted to add a new business method. Normally I would do this by opening the bean into the editor, navigating to the Methods tab, highlighting Business Methods, and clicking the Add (or Remove) button. In NWDI, however, I find these buttons disabled ("read only"). I was able to add the method directly in the source, but then had to manually add the method to the local and remote component interface source also.

Has anyone else had this problem or a similar problem for other development objects (i.e., an editor function that works outside of NWDI but apparently not in NWDI)?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Randy,

Could you please further list down the steps on how you have checked out the module? This would be useful to figure out the missing step.

Regards

Krupa

Former Member
0 Kudos

Sorry for the late response, I've been "offline" for a week.

I'm not entirely sure what you're asking, and I'm not entirely sure every step I followed more than a week ago. But here's what I did again today:

To start clean, I removed the EJB Module project from my client. Then I reloaded it by creating a project, synching all components. Then in the J2EE DC Explorer of the J2EE Development perspective, I unfolded ejb-jar.xml and right-clicked my (session) bean. From the context menu there's two things you can do, both of which I've tried:

(1) Select Open. This brings the bean into the editor. In the editor, I go to the Methods tab. As described in my original post, I highlight Business Methods, but the Add and Remove buttons remain greyed out. If I go to the Bean tab (source code)and hit the Enter key somewhere, I am prompted to create an Activity and I can edit the source code.

(2) Select DTR -> Edit or -> Edit (exclusive). That prompts me to create an Activity. Everything after is same as in (1) and in my original posting.

So the question is, why in NWDI can't I add and remove business methods in the Methods tab of the bean editor?

Former Member
0 Kudos

Can you use the Add and Remove buttons after you've checked out the file for Edit? If so, they are probably disabled, because files that have not been checked out are read-only.

sid-desh
Advisor
Advisor
0 Kudos

Hi Randy,

Did you try checking-out the complete project. Just try that using the navigator or package explorer view.

Regards

Sidharth

Former Member
0 Kudos

Sidharth,

You are right, that worked. It seems to me "wrong" that I can't do this when checking out the Bean itself for Edit from within the J2EE DC Explorer (which, as I originally stated, does allow me to edit the source code but disables the Methods editor). But a "wrong" solution is better than no solution Thanks!

Answers (0)