Hi Andrus, I used maven but I got the following errors:
[ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\access\DataNode.java:[333,10 ] error: DataNode.TransactionDataSource is not abstract and does not override abstract method getParentLogger() in CommonDataSource [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\DriverDataSource.java:[ 38,7] error: DriverDataSource is not abstract and does not override abstract method getParentLogger() in CommonDataSource [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\dba\oracle\OracleSQLTemplate Action.java:[107,10] error: OracleSQLTemplateAction.OracleResultSetWrapper is not abstract and does not override abstract method <T>getObject(Str ing,Class<T>) in ResultSet [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\access\TransactionConnection Decorator.java:[48,0] error: TransactionConnectionDecorator is not abstract and does not override abstract method getNetworkTimeout() in Connecti on [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\PoolDataSource.java:[39 ,7] error: PoolDataSource is not abstract and does not override abstract method getParentLogger() in CommonDataSource [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\PoolManager.java:[41,7] error: PoolManager is not abstract and does not override abstract method getParentLogger() in CommonDataSource [ERROR] \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\ConnectionWrapper.java: [47,7] error: ConnectionWrapper is not abstract and does not override abstract method getNetworkTimeout() in Connection I have jdk 1.7.02. Could it be because of that? Regards Bruno On Fri, Feb 24, 2012 at 11:17 AM, Andrus Adamchik <and...@objectstyle.org>wrote: > No it is not missing, just in a different module: > http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/CayenneRuntimeException.java?view=log&pathrev=1196716 > > You need to build the entire thing. Please check out these instructions: > > http://cayenne.apache.org/building-cayenne.html > > Cheers, > Andrus > > > On Feb 24, 2012, at 2:03 PM, Bruno René Santos wrote: > > > Hi Andrus, > > > > I have checked out cayenne from the svn and the > > org.apache.cayenne.CayenneRuntimeException is missing.... Is this on > > purpose? > > > > Regards > > Bruno > > > > On Fri, Feb 24, 2012 at 7:16 AM, Andrus Adamchik <and...@objectstyle.org > >wrote: > > > >> There was indeed a change between 3.1M3 and trunk (what will become M4 > at > >> some point) introduced by John: > >> > >> > >> > http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DataContextFactory.java?r1=1196716&r2=1196715&pathrev=1196716 > >> > >> But either way, it is customizable. > >> > >> Cheers, > >> Andrus > >> > >> > >> On Feb 24, 2012, at 2:03 AM, Bruno René Santos wrote: > >> > >>> Hi John, > >>> > >>> > >>> There is no newInstance() method to override on DataContextFactory... > are > >>> you sure this is the right way? > >>> > >>> Regards > >>> Bruno > >>> > >>> On Thu, Feb 23, 2012 at 6:18 PM, John Huss <johnth...@gmail.com> > wrote: > >>> > >>>> First you need to subclass the factory: > >>>> > >>>> public class MyContextFactory extends DataContextFactory { > >>>> @Override > >>>> protected DataContext newInstance(DataChannel parent, ObjectStore > >>>> objectStore) { > >>>> return new MyContext(parent, objectStore); > >>>> } > >>>> } > >>>> > >>>> Then, create a custom Dependency Injector module: > >>>> > >>>> import org.apache.cayenne.configuration.ObjectContextFactory; > >>>> import org.apache.cayenne.di.Binder; > >>>> import org.apache.cayenne.di.Module; > >>>> > >>>> public class AppModule implements Module { > >>>> public void configure(Binder binder) { > >>>> binder.bind(ObjectContextFactory.class).toInstance(new > >> MyContextFactory()); > >>>> } > >>>> } > >>>> > >>>> Then reference your module when creating the CayenneRuntime: > >>>> > >>>> ServerRuntime localRuntime = new > >>>> ServerRuntime("cayenne-MyDomain.xml", newAppModule()); > >>>> > >>>> John > >>>> On Thu, Feb 23, 2012 at 11:28 AM, Bruno René Santos < > brunor...@holos.pt > >>>>> wrote: > >>>> > >>>>> Hello all, > >>>>> > >>>>> I am trying to migrate my web application from 3.0.1 to 3.1M3. My > main > >>>>> problem now is that I usually use a custom DataContext in my Apps. In > >>>> 3.0.1 > >>>>> I would use the DataContextFactory (defined on the modeler) to > >> configure > >>>>> the use of the custom class. How do I do that on 3.1? > >>>>> > >>>>> Regards > >>>>> Bruno > >>>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> Bruno René Santos | brunor...@holos.pt | Gestor de Projectos | > Analista > >> | > >>> Programador | Investigador > >>> > >>> Holos - Soluções Avançadas em Tecnologias de Informação S.A. > >>> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan > Parque > >>> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal > >>> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt > >>> > >>> This email and any files transmitted with it are confidential and > >> intended > >>> solely for the use of the individual or entity to whom they are > >> addressed. > >>> If you are not the intended recipient or the person responsible for > >>> delivering the email to the intended recipient, be advised that you > have > >>> received this email in error and that any use, dissemination, > forwarding, > >>> printing, or copying of this email is strictly prohibited. If you have > >>> received this email in error please notify Bruno René Santos by > telephone > >>> on +351 210 438 686 > >> > >> > >> > > > > > > -- > > Bruno René Santos | brunor...@holos.pt | Gestor de Projectos | Analista > | > > Programador | Investigador > > > > Holos - Soluções Avançadas em Tecnologias de Informação S.A. > > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque > > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal > > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt > > > > This email and any files transmitted with it are confidential and > intended > > solely for the use of the individual or entity to whom they are > addressed. > > If you are not the intended recipient or the person responsible for > > delivering the email to the intended recipient, be advised that you have > > received this email in error and that any use, dissemination, forwarding, > > printing, or copying of this email is strictly prohibited. If you have > > received this email in error please notify Bruno René Santos by telephone > > on +351 210 438 686 > > > -- Bruno René Santos | brunor...@holos.pt | Gestor de Projectos | Analista | Programador | Investigador Holos - Soluções Avançadas em Tecnologias de Informação S.A. Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify Bruno René Santos by telephone on +351 210 438 686