[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Auto Binding of MYSQL cartridge



----- Original Message -----
> From: "Shabna M" <shabsrh gmail com>
> To: "Jürgen Hoffmann" <jhoffmann redhat com>
> Cc: users lists openshift redhat com, dev lists openshift redhat com
> Sent: Thursday, July 24, 2014 6:41:22 AM
> Subject: Re: Auto Binding of MYSQL cartridge
> 
> Hi
> 
> I have been looking into this- and i am finding it difficult to understand
> the document-
> Some areas of confusion are :
> 1- when is this feature actually used and how is it different han just
> setting env variables in a gear ?

by "this feature" I assume you are referring to the auto-definition of datasources in the jboss standalone.xml (if not, the rest of my input is not relevant).

It abstracts the environment variables, so that your application can just code to use a datasource named "myDS" (or whatever you like), and "myDS" will take on the connection information for the database, where ever it is placed.

It's not all that different from coding your application to use the OPENSHIFT environment variables to make the database connection, except that it is somewhat more portable and "java-esque".


> 2.How does this feature help when the cart is on the same gear ,since anyways
> app will have access to all cart- specific env variables.

It's not about which gear it's on (the appropriate DB connection env variables will be available to the application whether it is on the same gear or not).  It's just about defining proper jboss datasource configuration based on the database deployment (ie proper hostname, port, username, and password information in the datasource definition)


> 3. The publish values - would this be a hard coded ones.

I'm not sure which values you are referring to or what you mean by "hard coded" (hardcoded where?)

> 
> Apologise if i got it wrong ,but would be great if anybody who has used this
> feature explain with an example.
> 
> Thanks
> Shabs
> 
> 
> On Fri, Jul 11, 2014 at 8:40 PM, Jürgen Hoffmann < jhoffmann redhat com >
> wrote:
> 
> 
> 
> Of course you need to configure to use the correct DS inside your app.
> 
> Buddy
> 
> 
> On 11.07.2014, at 16:58, Shabna M < shabsrh gmail com > wrote:
> 
> 
> 
> 
> An interesting insight-I have never thought this was possible-
> I will test it and try out and will post the outcome-Though it seems a little
> challenging.
> 
> Any pointers from anyone who has experience with this is always welcome.
> 
> Shabs
> 
> 
> On Wed, Jul 9, 2014 at 7:08 PM, Clayton Coleman < ccoleman redhat com >
> wrote:
> 
> 
> 
> I believe JBossAS automatically gets a data source pointing to MySQL created,
> in much the same way as the CF blog describes. I don't know whether spring
> or the other DI frameworks in Java automatically pick it up though.
> 
> Someone else may know for sure.
> 
> On Jul 9, 2014, at 3:29 AM, Shabna M < shabsrh gmail com > wrote:
> 
> 
> 
> 
> Hi All
> 
> I have a question - regarding binding of MYSQL service provided by Open
> Shift.
> 
> Is there a way in which an application bound to MYSQL (any instance say local
> or external) can start using OpenShift MYSQL instance by just adding the
> cartrdige to the app , without making simgle line of change in the
> application itself. (By no changes I mean ,not using the OpenShift variables
> explicitly)
> 
> I know its a challenging requirement -and I thought this may not be possible
> in any Paas
> but then I stepped upon this feature in CF -
> 
> https://spring.io/blog/2011/11/04/using-cloud-foundry-services-with-spring-part-2-auto-reconfiguration
> 
> Any thoughts on this ? and how it can be accomplished in Open Shift -?
> 
> Thanks
> Shabna
> 
> 
> 
> 
> 
> 
> _______________________________________________
> dev mailing list
> dev lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> 
> _______________________________________________
> dev mailing list
> dev lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> 
> 
> 
> _______________________________________________
> dev mailing list
> dev lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]