-->
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.  [ 3 posts ] 
Author Message
 Post subject: multiple developers = multiple schemas?
PostPosted: Fri Aug 01, 2008 1:53 pm 
Newbie

Joined: Fri Aug 01, 2008 1:43 pm
Posts: 2
Hello,

My team is running a java app with an oracle server. We are using hibernate with annotations for object relational mapping.

The challenge which we are faced with, is that we want to set up a sandbox for each developer for testing. However, using an oracle backend makes it infeasible for each user to have their own database.

The solution we came up with, is to assign a new schema for each developer.

First of all, is this the best way to do this?
Secondly, is there a way to dynamically create hibernate bindings at run time?

Any help is mutch appreciated.

Dave


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 4:10 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
>>First of all, is this the best way to do this?

I think what you have is a strategy that works, and that's the most important thing. As far as dynamic binding, well, it depends on how dynamic you want it to be?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Runtime Bindings
PostPosted: Fri Aug 01, 2008 4:54 pm 
Newbie

Joined: Fri Aug 01, 2008 1:43 pm
Posts: 2
Thanks for the reply.

I guess you're right in that above all else, it is more important for a solution that works.

The brings us to the second question. When speaking about dynamic binding, I am wondering if there is away to condition the schema for hibernate bindings based on a user's identity?

Meaning, after starting a junit test, can we set our hibernate bindings based on different conditions?

For instance, in our junit setup, can we do something like:

public setUp() {
if (env != "prod")
bind hibernate model to "dev_" user
else
bind hibernate model to "prod_" user
}

I'm unsure whether hibernate allows runtime bindings...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.