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

How to get session of different shard (Hibernate Shard)

 
Rahul Bala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I do not know how to get session of different shard. please help as i did not get any example.
 
Rahul Bala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is this guys, no one here to give solution
 
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.

You have to remember that we're all volunteers here. We always try our hardest to help out, but sometimes we get busy, sometimes we don't log in for a while, and believe it or not, sometimes we don't have the answers!

Hibernate Shards is fairly new, and certainly isn't as pervasive as other Hibernate technologies. As a result, finding someone with that particular skillset might be difficulty.

From what I understand, you just build your ShardSessionFactory, and get the session from the factory. That should bridge over each database, no?



JBoss' Hibernate Shards Documentation and Examples

Let us know what you've tried, show us some code, and tell us the errors you're having. Perhaps then we might be able to zero in on your problems.

-Cameron McKenzie

 
Rahul Bala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for tour reply, but i want to get session of different configuration file so i can fire SQL query on that database.



this is the only code which i got to create session factory, but the problem is how to get session of different configuration file.
Here we configure first xml file and add rest of configuration file, but the problem is you get the session of first configuration file shard0.hibernate.cfg.xml, but how to get other. I search lot but did not get any example and amaze why it is not there in hibernate official site. If any one know please reply.
 
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
Thanks for the extra detail. It is indeed helpful.

This is a tough one, Greenhorn. Here's hoping someone can pipe in with the answer.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic