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 How does CMP convert db types to java types? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How does CMP convert db types to java types?" Watch "How does CMP convert db types to java types?" New topic
Author

How does CMP convert db types to java types?

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
In CMP, how does a type in the database convert to a type in the EJB, and vice versa?
What is the usual practice in getting a Timestamp field from the database? java.util.Date or java.sql.Timestamp? As java.sql.Timestamp is the return class of ResultSet.getTimestamp().
Chu
EJB 1.1
[ June 12, 2002: Message edited by: Chu Tan ]
Rick Salsa
Ranch Hand

Joined: Jul 17, 2001
Posts: 173
Hi Chu,
That will depend on your appserver. I use JBoss, and I know that I had to map Dates to java.sql.Timestamp. Check your appserver's documentation. There should be some sort of XML file that contains these mappings.
HTH,
/rick
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does CMP convert db types to java types?