aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes CMP 2.0   Oracle Dates Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "CMP 2.0   Oracle Dates" Watch "CMP 2.0   Oracle Dates" New topic
Author

CMP 2.0 Oracle Dates

Justin Krettabull
Greenhorn

Joined: Sep 08, 2004
Posts: 26
I'm new to EJB. I have several finders that are dependent on date values. I'm using Oracle 9i

I've read that CMP 2.0 does not support Dates. Are there any workarounds for this or am I stuck using BMP?

thanks,

Justin
Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
You can let the session bean to generate the Date (Server date) then insert to your EJB field, or you can create a seperate SQL Call to get the Date (DB date) then insert to your EJB field. Use the Timestamp as sql type so that it will support at hour:minute:second level.
Justin Krettabull
Greenhorn

Joined: Sep 08, 2004
Posts: 26
I tried passing a Timestamp to the finder and it didn't work.

I'm using Websphere 5.1 App. Server with Oracle 9i. I think Websphere only supports Timestamp with DB2.

Looks like I'm gonna have to write BMP's for the queries that return results based on date range.

thanks for your help
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: CMP 2.0 Oracle Dates
 
Similar Threads
CMP to Map multiple tables
Batch update in EJB
Entity Beans must use CMP?
Entity EJB Question...
Mapping 4 database tables using single CMP bean