You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Sheldon <wa...@web.de> on 2012/03/14 16:07:17 UTC

cayenne 3.1: configure mymodule

Hello,
I've create a custom module "MyModule", where I bind DataSourceFactory and
DataDomain.
Now I don't user a xml file.

ServerRuntime runtime = new ServerRuntime("", new MyModule());

If I want to geht the ObjectContext I get a ConfigurationException:  Error
loading configuration from file ...

How can I disable this?

best regards

--
View this message in context: http://cayenne.195.n3.nabble.com/cayenne-3-1-configure-mymodule-tp3825651p3825651.html
Sent from the Cayenne - Dev mailing list archive at Nabble.com.

Re: cayenne 3.1: configure mymodule

Posted by Andrus Adamchik <an...@objectstyle.org>.
But you still need to bootstrap the runtime. There are many ways to do it, and John's suggestion is one of them, and a very simple one for that matter.

If you still want to do everything in the code, you may need to override a few more services. What's the stack trace of the Exception? It should give a hint where to start.

Andrus

On Mar 15, 2012, at 4:02 AM, Sheldon wrote:

> But I don't need a xml-configuration!
> 


Re: cayenne 3.1: configure mymodule

Posted by Sheldon <wa...@web.de>.
But I don't need a xml-configuration!

--
View this message in context: http://cayenne.195.n3.nabble.com/cayenne-3-1-configure-mymodule-tp3825651p3828116.html
Sent from the Cayenne - Dev mailing list archive at Nabble.com.

Re: cayenne 3.1: configure mymodule

Posted by John Huss <jo...@gmail.com>.
Why don't you just use Cayenne Modeler to create an empty project (with
just a DataDomain) and save it?  You can then add everything to it at
runtime.

On Wed, Mar 14, 2012 at 10:07 AM, Sheldon <wa...@web.de> wrote:

> Hello,
> I've create a custom module "MyModule", where I bind DataSourceFactory and
> DataDomain.
> Now I don't user a xml file.
>
> ServerRuntime runtime = new ServerRuntime("", new MyModule());
>
> If I want to geht the ObjectContext I get a ConfigurationException:  Error
> loading configuration from file ...
>
> How can I disable this?
>
> best regards
>
> --
> View this message in context:
> http://cayenne.195.n3.nabble.com/cayenne-3-1-configure-mymodule-tp3825651p3825651.html
> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
>