cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <johnth...@gmail.com>
Subject Re: Cayenne 3.1 DI - binding
Date Wed, 28 Mar 2012 16:38:41 GMT
For extended types you can just do it in your application startup code, not
in the DI module.  For me that's in the init method of my HessianServlet
subclass.  I don't think there is any DI binding for it.

For the adapters you could do the same thing.  There is also a way to load
the adapter configuration from a properties file, but I don't have the
specifics right now since the property names changed recently.  Or you can
set it in CayenneModeler.

John

On Wed, Mar 28, 2012 at 10:50 AM, Bruno René Santos <brunorene@holos.pt>wrote:

> Hello all,
>
> I am migrating my apps to cayenne 3.1 and I have some doubts:
>
> I have already created a Module to bind implementations:
>
> public class CayenneModule implements Module {
>
>    @Override
>    public void configure(Binder binder) {
>        binder.bind(ObjectContextFactory.class).toInstance(new
> HolosContextFactory());
>    }
> }
>
> I noticed now that the 3.0 DBAdapters are gone from the Modeler and so How
> can I:
>
> 1. Bind these adapters
> 2. Bind ExtendedTypes
>
> Can I include these new bindings on the same Module?
>
> Regards
> Bruno Santos
>
> --
> Bruno René Santos | brunorene@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message