-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Shards and Datasource
PostPosted: Thu Sep 02, 2010 6:22 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
Hi all,

I was wondering if it was possible to configure Hibernate Shards in a Application Server (let's say JBossAS) as a Datasource ?
I didn't find any clue in the forum or in the documentation.

Thanks

Regards


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 3:04 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,
sorry but Hibernate Shards does not implement the Datasource interface, so you can't expose it like that

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 3:17 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
Right that is what I thought.

Is this supposed to be in a roadmap or do you think about there is a way the DataSouce interface may be implemented via Shards?

thanks anyway


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 3:33 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
no that's not the mission of Shards; I think you might use this: http://jboss.org/teiid

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 4:30 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
yeah, thanks, this seems to answer to the need I have.


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 6:37 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
In facts, I was a bit too much enthusiastic about teiid project. The thing is that I do have a some sort of sharded databases with same data structure.
Teiid lacks the shard possibility (or maybe I have missed it). It raises me a ambiguous table name error when using 2 sharded database.

As I understand it, for the moment, I have to use hibernate without JPA to use shards.

I do not understand why that's not the mission of Shards to be exposed as a Datasource since it has a lot of already needed functionalities. Why not a ShardedEntityManager?


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 8:40 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Why not a ShardedEntityManager?

I think that if you want to use advanced features, you're going to stick with Hibernate anyway (instead of JPA, especially if it's about JPA1)
But I don't think anybody would oppose that, just that nobody made it. feel free to propose a patch!

I'm not sure about a thing: you where asking about a Datasource, but now you appear to need JPA?

For questions about Teiid & sharding, please ask them on the Teiid forum.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 8:56 am 
Newbie

Joined: Fri Nov 25, 2005 9:12 am
Posts: 1
Location: Norway
Hi, it seems data source routing may be more of a solution for you. Have a look at the following blog post - it may have something of interest for you: http://blog.springsource.com/2007/01/23 ... e-routing/


Top
 Profile  
 
 Post subject: Re: Shards and Datasource
PostPosted: Fri Sep 03, 2010 9:09 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
thanks karko, I have been through this too and it doesn't suit me.

In fact, I was speaking about Datasource and EntitManager because I need to use EJB 3.0 persistence in the JBossAS and I would like to avoid using Spring inside Jboss. And I didn't find a way to create a routing datasource like your example showed with JCA and the JbossAS.

I will ask the teiid forum for information thanks. this projet looks a little bit more up to date than hibernate shards (sorry about that).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.