File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and Other Java EE Technologies and the fly likes DB Column Order and EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "DB Column Order and EJBs" Watch "DB Column Order and EJBs" New topic
Author

DB Column Order and EJBs

Buzz Andersen
Ranch Hand

Joined: Aug 28, 2001
Posts: 54
Hi,
I'm new to working with Enterprise JavaBeans, and I have a simple question that none of my books, websites, etc. seem to answer. I am using JBoss, and when I create a new entity bean, it sets up a table in the database matching the cmp fields in the bean. It seems to put them in rather arbitrary order, however, whereas I would like to set them up in a more specific way. Is there any way (perhaps through the ejb-jar.xml file) to control how these columns are ordered?
Buzz
[This message has been edited by Buzz Andersen (edited November 06, 2001).]
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3878
Well, database column order doesn't matter in a database, so you could always drop your database table and use a CREATE statement to put it back in the order you like...
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
[This message has been edited by Kyle Brown (edited November 06, 2001).]


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Buzz Andersen
Ranch Hand

Joined: Aug 28, 2001
Posts: 54
Yeah, I know it doesn't matter--I'm just kind of anal about things like that :-). Thanks for the advice...
 
 
subject: DB Column Order and EJBs
 
Threads others viewed
Moving a bean from request to session context
Are Applets widely used?
Enumeration or a better way
Bad idea to store user-defined objects in sessions?
Why Does This Produce Empty Jar Files?
developer file tools