-->
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.  [ 7 posts ] 
Author Message
 Post subject: constructable net.sf.hibernate.cfg.Configuration?
PostPosted: Sat Jun 05, 2004 7:40 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
Hi all,

I would like to use confugration in pico, and if configuration would provide
constructors, which resemble various configure() methods, my life would be easier.

Now I have to write subclass it and write those constructors myself.

Any chance that you can provide those constructors?

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 05, 2004 10:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
eh - do you want approx. N+1 constructors on Configuration ?

You will have to present two things for this to happen:

1. the constructors you think you are missing

2. a very good reason for having such a possible complex constructors when the current system works perfectly with anything else ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 06, 2004 2:55 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
1. all the same paameters as various configure(whatever) methods
2. being able to use Configuration as pico component without writing
a wrapper myself.

I would be glad to contribute those 15 lines of code to hibernate team,
and not to put them intopicocontainer code.

This way it's better in synch.

What I would like to avoid to commit to nanocontainer:
---%<-------------------
/*****************************************************************************
* Copyright (c) PicoContainer Organization. All rights reserved. *
* ------------------------------------------------------------------------- *
* The software in this package is published under the terms of the BSD *
* style license a copy of which has been included with this distribution in *
* the license.html file. *
* *
* Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant *
*****************************************************************************/
package org.nanocontainer.hibernate;

import net.sf.hibernate.cfg.Configuration;
import net.sf.hibernate.HibernateException;

import java.net.URL;
import java.io.File;

/**
* constructable hibernate configuration. not a rocket science, just a wrapper aroung
* various configure() methods... see respective hibernate javadocs.
* @author Konstantin Pribluda
* @version $Revision:$
*/
public class ConstructableConfiguration extends Configuration {

public ConstructableConfiguration() throws HibernateException {
configure();
}

public ConstructableConfiguration(URL url) throws HibernateException {
configure(url);
}
public ConstructableConfiguration(String resource) throws HibernateException {
configure(resource);
}

public ConstructableConfiguration(File configFile) throws HibernateException {
configure(configFile);
}
}
---%<-----------------

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 06, 2004 3:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if is only those few methods with a single parameter to the constructor then we might be convinced ;)

if you submit it as a patch against Configuration.java on the JIRA there is
a higher probability for it being integrated..

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 4:28 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
to be hones, I have my problems to provide patch against newest hibernate version.

Im not sure against which one.

HEAD is not used ( was not ) , and I do not know which branch to take....


For now I will commit it into nanocontainer-hibernate, and you may pick it up if you like.
( like velocity people did so there is no "nanocontainer-velocity" yet.)

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 4:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
v21branch => v21.x

HEAD => hibernate 3

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 4:39 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Max, you still have the old tags :)

Hibernate2 HEAD => Hibernate 2.1.x
Hibernate3 HEAD => Hibernate 3.0 alpha

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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