aspose file tools*
The moose likes Websphere and the fly likes Renaming Entity Bean in WASD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Renaming Entity Bean in WASD" Watch "Renaming Entity Bean in WASD" New topic
Author

Renaming Entity Bean in WASD

Adrian Bates
Greenhorn

Joined: Jun 01, 2005
Posts: 24
I have used:
Generate --> EJB to RDB Mapping and selected Bottom Up
to automatically generate my entity beans from my database.

Is there anyway that I can now rename these entity beans as they are all named after the database tables that they connect to. This is fine except that the tables have a different naming convention to that used in Java.

I have tried refactoring the individual classes but it doesn't seem to update the deployment descriptor

Thanks in advance,
Adrian
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

Adrian,
Welcome to JavaRanch!

In WSAD, there is a J2EE perspective. In there, open the EJB (under EJB modules) and rename it there.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Adrian Bates
Greenhorn

Joined: Jun 01, 2005
Posts: 24
Hi Jeanne

Thanks for the reply. Can I just qualify exactly what it is that I'm supposed to rename?

I went into the J2EE perspective and the J2EE Hierarchy view and opened the EJB Module / EJB Project / Entity bean folder. If I right click the entity bean I wish to rename I do not get a rename option in the context sensitive menu.

However if I right click the actual class files that make up the entity bean then I can select refactor --> rename. Is this what I am meant to be doing? I have tried this and it produces all sorts of problems. Is there a specific order that I need to do things in?

Thanks again,
Adrian

p.s. I am using Websphere Studio 1.5.2, I wonder if this is why I don't have a rename option. Does that come with Websphere 6.0
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

Adrian,
I went into the J2EE perspective and the J2EE Hierarchy view and opened the EJB Module / EJB Project / Entity bean folder. If I right click the entity bean I wish to rename I do not get a rename option in the context sensitive menu.

I definitely meant this. I'll check tomorrow in by WSAD to see if I have the option there or somewhere else.

However if I right click the actual class files that make up the entity bean then I can select refactor --> rename. Is this what I am meant to be doing? I have tried this and it produces all sorts of problems. Is there a specific order that I need to do things in?

No. This is just like changing the name the way you were the first time.

p.s. I am using Websphere Studio 1.5.2, I wonder if this is why I don't have a rename option. Does that come with Websphere 6.0

I'm also using WSAD 5.1.X, so that's not the problem.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

Adrian,
You're right; it's not an option. I think you have to rename the classes the way you were doing. Another thing is to go into the source of the EJB xml file. There you can change the display name for the EJB as displayed in the J2EE perspective.
Adrian Bates
Greenhorn

Joined: Jun 01, 2005
Posts: 24
Thanks for looking Jeanne. I have been away for a week which is why I have got back to you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Renaming Entity Bean in WASD