Hello Victor,

If your new command's constructor takes an instance of `HibernateBundle`,
then you can use the value of `hibernate.getSessionFactory()` within the
command's run method to create your DAO(s). All of the application's
bundles are initialized and run prior to the invocation of the command's
`run` method, so the database connection should be set up for you.

On Mon, Nov 7, 2016 at 1:52 AM, <[email protected]> wrote:

> Hi,
>
> I would like to define some commands that exploit the DAO I defined with
> hibernate.
>
> I can't find a way to easily uses them: I would need to register the
> hibernate bundle in order to configure it with respect to my database
> configuration, but in a command, by definition, there is no bundles
> available!
>
> Any idea on how to do that elegantly?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Evan Meagher

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to