Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alter session to set NLS_CALENDAR = 'Persian'

 
Vijeth Konanavar Bhadrappa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to this Hibernates/Springs. In my application, I have to use date according to Persian calendar. So is there anyway to set this at the time of Connection pooling or is any way to set this globally for whole application?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Greenhorn!

Hmmm...

Are you setting this for the application for the database, the connection, the application, or what?

-Cameron McKenzie
 
Vijeth Konanavar Bhadrappa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm fine.. McKenzie, I want that to be applied for every Database operation which application executes.

Earlier i had developed the same application in EJB. When i get a connection from connection pool, i will execute the alter session query using that connection, and execute all database operations using the same connection object.

But in this Springs/Hibernate, we will take a session object from session factory and use that session object for all transactions done on Database. As per my understanding, while creating connection pool, in-turn this session factory, there should be some way to alter the session properties like NLS_CALENDAR.


Am i correct? Please correct me if i am wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic