jndi?

View: New views
6 Messages — Rating Filter:   Alert me  

jndi?

by Corey-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


What's the most simple method of keeping my database password out of
DataSource.groovy?

I've never used jndi, but I've looked at some docs and it appears difficult
to know where to start.


Thanks


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: jndi?

by Lucas F. A. Teixeira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You can configure your datasource in you app server, and use its jndi name in your app.

[]s,

Lucas

Lucas Frare A. Teixeira
lucas.teixeira@...
Tel: +55 11 3660.1622 - R3018


Corey escreveu:
What's the most simple method of keeping my database password out of 
DataSource.groovy? 

I've never used jndi, but I've looked at some docs and it appears difficult
to know where to start.


Thanks


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




  

Re: jndi?

by Graeme Rocher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have two options.

JNDI

dataSource {
     jndiName = "..name.."
}

Externalized Config

grails.config.locations = [ "file:${userHome}/yourapp/dataSource.properties" ]

Cheers

On Thu, May 15, 2008 at 2:49 PM, Corey <corey_s@...> wrote:

>
>  What's the most simple method of keeping my database password out of
>  DataSource.groovy?
>
>  I've never used jndi, but I've looked at some docs and it appears difficult
>  to know where to start.
>
>
>  Thanks
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>



--
Graeme Rocher
Grails Project Lead
G2One, Inc. Chief Technology Officer
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: jndi?

by Corey-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Saturday 17 May 2008 08:30:07 am Graeme Rocher wrote:

> You have two options.
>
> JNDI
>
> dataSource {
>      jndiName = "..name.."
> }
>
> Externalized Config
>
> grails.config.locations = [
> "file:${userHome}/yourapp/dataSource.properties" ]
>

Very cool - many thanks!




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: jndi?

by diongillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is it possible using grails.config.locations to 'switch' the
environment of a pre built war to use another defined datasource?

On Sat, May 17, 2008 at 6:30 PM, Graeme Rocher <graeme@...> wrote:

> You have two options.
>
> JNDI
>
> dataSource {
>     jndiName = "..name.."
> }
>
> Externalized Config
>
> grails.config.locations = [ "file:${userHome}/yourapp/dataSource.properties" ]
>
> Cheers
>
> On Thu, May 15, 2008 at 2:49 PM, Corey <corey_s@...> wrote:
>>
>>  What's the most simple method of keeping my database password out of
>>  DataSource.groovy?
>>
>>  I've never used jndi, but I've looked at some docs and it appears difficult
>>  to know where to start.
>>
>>
>>  Thanks
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Graeme Rocher
> Grails Project Lead
> G2One, Inc. Chief Technology Officer
> http://www.g2one.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
dIon Gillard
"Any sufficiently advanced technology is indistinguishable from magic"
- Arthur C. Clarke 1917 - 2008

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: jndi?

by Graeme Rocher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, May 19, 2008 at 7:26 AM, Dion Gillard <dion@...> wrote:
> Is it possible using grails.config.locations to 'switch' the
> environment of a pre built war to use another defined datasource?

Yes just place the setting in the nested environment blocks instead

Cheers

>
> On Sat, May 17, 2008 at 6:30 PM, Graeme Rocher <graeme@...> wrote:
>> You have two options.
>>
>> JNDI
>>
>> dataSource {
>>     jndiName = "..name.."
>> }
>>
>> Externalized Config
>>
>> grails.config.locations = [ "file:${userHome}/yourapp/dataSource.properties" ]
>>
>> Cheers
>>
>> On Thu, May 15, 2008 at 2:49 PM, Corey <corey_s@...> wrote:
>>>
>>>  What's the most simple method of keeping my database password out of
>>>  DataSource.groovy?
>>>
>>>  I've never used jndi, but I've looked at some docs and it appears difficult
>>>  to know where to start.
>>>
>>>
>>>  Thanks
>>>
>>>
>>>  ---------------------------------------------------------------------
>>>  To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>>
>> --
>> Graeme Rocher
>> Grails Project Lead
>> G2One, Inc. Chief Technology Officer
>> http://www.g2one.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> dIon Gillard
> "Any sufficiently advanced technology is indistinguishable from magic"
> - Arthur C. Clarke 1917 - 2008
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Graeme Rocher
Grails Project Lead
G2One, Inc. Chief Technology Officer
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email