This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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?