Re: Cayenne And SpringBoot

2019-08-25 Thread Joe Baldwin
Andrus, > Also just found this on GitHub [1]. Not sure how legit it is. But posting our > own "canonical" SpringBoot example is probably a good idea. On the subject of 'working examples', I could not agree more. Cayenne 4 is an excellent framework, and there are some excellent working exam

Re: Cayenne And SpringBoot

2019-08-13 Thread Ken Anderson
Lovely…. I guess the list doesn’t support attachments… CayenneService.java: package com.theproductlab.cayenne; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.spr

Re: Cayenne And SpringBoot

2019-08-13 Thread Ken Anderson
Here’s what I did - but it’s a year + old… Please note that it also integrates Hikari for connection pools. With the above done, all you should have to do is: @Autowired ICayenneService cayenneService; Again, I probably can’t answer questions too quickly, but hopefully this h

Re: Cayenne And SpringBoot

2019-08-13 Thread John Huss
You don't want to construct multiple ServerRuntimes, especially not one per context. You just need one runtime and you can create many contexts from it. On Tue, Aug 13, 2019 at 1:09 PM Emerson Castañeda wrote: > I got this working using this approach: > > *dependencies:* > > //for persistency >

Re: Cayenne And SpringBoot

2019-08-13 Thread Emerson Castañeda
I got this working using this approach: *dependencies:* //for persistency compile 'org.apache.cayenne:cayenne-server:X.Y' compile 'org.apache.cayenne:cayenne-java8:X.Y' compile 'com.oracle:ojdbc.x.y.b' *application.yml* spring: application: name: app-api evnpath: ca

Re: Cayenne And SpringBoot

2019-08-13 Thread Andrus Adamchik
> Cayenne is pretty generic as far as integrations go - it should work well > and easily with any framework. Yep. >> Has anyone done this before? Are there any suggestions on what I should >> be certain to do or avoid? Should I just spin up the standard Cayenne web >> filter? Are there other

Re: Cayenne And SpringBoot

2019-08-13 Thread John Huss
Cayenne is pretty generic as far as integrations go - it should work well and easily with any framework. Just create your ServerRuntime and define a way to retrieve it (using ServletContext.setAttribute is typical). Then you'll want to bind the runtime to each request that comes in, which is all th

Cayenne And SpringBoot

2019-08-13 Thread Tony Giaccone
I want to look into using Cayenne with SpringBoot. I was able to get a basic cayenne stack up and running by implementing a ContextListener and on the create event starting up a Cayenne Runtime. I was using an in memory database and I had problems getting the ;create=true working. My hack was t