Yes. Alternatively you can use ServerRuntimeBuilder (especially if you have various customizations), but ServerRuntime constructor works just as well.
Andrus > On Jul 4, 2015, at 1:30 PM, Joe Baldwin <jfbald...@earthlink.net> wrote: > > Is this example from (https://cayenne.apache.org/docs/4.0/tutorial/ch05.html > <https://cayenne.apache.org/docs/4.0/tutorial/ch05.html>) still considered > correct? (Specifically the ServerRuntime instantiation): > > > package org.example.cayenne; > import org.apache.cayenne.ObjectContext; > import org.apache.cayenne.configuration.server.ServerRuntime; > > public class Main { > public static void main(String[] args) { > ServerRuntime cayenneRuntime = new ServerRuntime("cayenne-project.xml"); > ObjectContext context = cayenneRuntime.newContext(); > } > }