You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2014/02/01 18:51:42 UTC

declare datasource into tomee.xml with variable env of mysql Openshift

hi. i would i*install tomee* with diy into openshift. from :

https://github.com/openshift-quickstart/openshift-tomcat-quickstart
<https://github.com/openshift-quickstart/openshift-tomcat-quickstart>  

ON openshift i would active  also mysql  .

>From openshift i can get the value of variable env of db and other .

https://www.openshift.com/page/openshift-environment-variables
<https://www.openshift.com/page/openshift-environment-variables>  

NOw i would create into tomee.xml a Reosuce for a datasource without hard
code the value , but use the variable env .

Like i have to make it?
i have to export a Variable env woth the -Dproerties that reference at
$(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
$(nameofsystempropetriessettovariableexported)
 ?


example: 
openshift variables available for mysql:
OPENSHIFT_MYSQL_DB_HOST 	127.0.250.1 	The hostname or IP address to use to
connect to 
OPENSHIFT_MYSQL_DB_PORT 	3306 	The port your database server is listening on
OPENSHIFT_MYSQL_DB_USERNAME 	admin 	Your database administrative username
OPENSHIFT_MYSQL_DB_PASSWORD


into the 
openshift-tomcat-quickstart /.openshift /action_hooks /start file that it is
called from the openshift when i push , i have to add:

export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
-D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
-Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME 
-Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
-Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????

 FOR get the values into java  system properties -

And into the tomee.xml , into the declaration of resource of db:

<Resource id="myapp_mysqDBl" type="DataSource">
  JdbcDriver  com.mysql.jdbc.Driver
  JdbcUrl   ${mydburl}
  UserName    ${mydbusername}
  Password  ${mydbpassword}
  JtaManaged true
</Resource>

Then  from the persistence.xmol into my web apps i reference only with :
<JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>

PLEase the procedure it is correct of  

*export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
-D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
-Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME 
-Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
-Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
and referecne at properties int othe tomee.xml  ?




--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by mauro2java2011 <ma...@gmail.com>.
Tank you very much for all responses.
Mauro
Il giorno 03/feb/2014 13.12, "Romain Manni-Bucau [via OpenEJB]" <
ml-node+s979440n4667463h28@n4.nabble.com> ha scritto:

> = is optional but makes things clearer
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-02-03 mauro2java2011 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667463&i=0>>:
>
>
> > From
> >
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
> > It usr the sign = for set properties of datasource
> >
> > http://tomee.apache.org/datasource-config.html
> > Il giorno 02/feb/2014 08.29, "Romain Manni-Bucau [via OpenEJB]" <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4667463&i=1>>
> ha scritto:
> >
> >> It is designed for 1.6 yes.
> >>
> >> peenshift only exposes http port so jms is not accessible by default
> >> outside of the cartridge
> >>
> >> jndi lookup should work this way
> >>
> >> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4667430&i=0>>
> >> a
> >> écrit :
> >>
> >> > veri very interessant. The link of tomee quickstart ,but i you ask:
> >> > 1) it is tomee 1.6.0 web or plus version????
> >> > 2) i have view taht on tomee  JMS it is bind at port 67606  or some
> like
> >> .
> >> > it work also on openshift ????? i can call jms openshift application
> >>  with
> >> > JNDI from a remote application  ??????
> >> > 3) on tomee deployed at openshift , it is possible call EJB remote
> from
> >> > remote client standalone or from other tomee remote?
> >> > i have to call at
> http://namehostonopenshift/nameofapplication/tomee/ejb
> >> > ??????
> >> > not on port 8080 but at port 80 for get the JNDI context from
> >> remote?????
> >> > 4) whi the variables env work on resources.xml and on tomee it is
> >> > necessaire hook file ?
> >> > tank you .
> >> >
> >> >
> >> >
> >> >
> >> > 2014-02-01 Romain Manni-Bucau [via OpenEJB] <
> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4667430&i=1>>:
>
> >> >
> >> >> I dont recall in tomee.xml but resources.xml should support env var
> >> too.
> >> >>
> >> >> Fyi openshift has tomee integration if you host it
> >> >>
> >> >>
> >>
> >>
> https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
> >> >>
> >> >>
> >>
> >>
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
> >> >>
> >> >> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
> >> http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
> >>
> >> >> a
> >> >> écrit :
> >> >>
> >> >> > hi. i would i*install tomee* with diy into openshift. from :
> >> >> >
> >> >> >
> https://github.com/openshift-quickstart/openshift-tomcat-quickstart
> >> >> > <
> https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
> >>
> >> >> >
> >> >> > ON openshift i would active  also mysql  .
> >> >> >
> >> >> > From openshift i can get the value of variable env of db and other
> .
> >> >> >
> >> >> > https://www.openshift.com/page/openshift-environment-variables
> >> >> > <https://www.openshift.com/page/openshift-environment-variables>
> >> >> >
> >> >> > NOw i would create into tomee.xml a Reosuce for a datasource
> without
> >> >> hard
> >> >> > code the value , but use the variable env .
> >> >> >
> >> >> > Like i have to make it?
> >> >> > i have to export a Variable env woth the -Dproerties that
> reference
> >> at
> >> >> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
> >> >> > $(nameofsystempropetriessettovariableexported)
> >> >> >  ?
> >> >> >
> >> >> >
> >> >> > example:
> >> >> > openshift variables available for mysql:
> >> >> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
> >> >> address to use to
> >> >> > connect to
> >> >> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database
> server
> >> is
> >>
> >> >> listening on
> >> >> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database
> administrative
> >> >> username
> >> >> > OPENSHIFT_MYSQL_DB_PASSWORD
> >> >> >
> >> >> >
> >> >> > into the
> >> >> > openshift-tomcat-quickstart /.openshift /action_hooks /start file
> >> that
> >> >> it
> >> >> is
> >> >>
> >> >> > called from the openshift when i push , i have to add:
> >> >> >
> >> >> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
> >> >> >
> >> >> >  FOR get the values into java  system properties -
> >> >> >
> >> >> > And into the tomee.xml , into the declaration of resource of db:
> >> >> >
> >> >> > <Resource id="myapp_mysqDBl" type="DataSource">
> >> >> >   JdbcDriver  com.mysql.jdbc.Driver
> >> >> >   JdbcUrl   ${mydburl}
> >> >> >   UserName    ${mydbusername}
> >> >> >   Password  ${mydbpassword}
> >> >> >   JtaManaged true
> >> >> > </Resource>
> >> >> >
> >> >> > Then  from the persistence.xmol into my web apps i reference only
> >> with
> >> :
> >>
> >> >> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
> >> >> >
> >> >> > PLEase the procedure it is correct of
> >> >> >
> >> >> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
> >> >> > and referecne at properties int othe tomee.xml  ?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > View this message in context:
> >> >>
> >> >>
> >>
> >>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
> >>
> >> >> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >> >> >
> >> >>
> >> >> --
> >> >> *Romain Manni-Bucau*
> >> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >> >> *Blog: **http://rmannibucau.wordpress.com/*<
> >> >> http://rmannibucau.wordpress.com/>
> >> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> >> >> <http://fr.linkedin.com/in/rmannibucau>*
> >> >> *Github: https://github.com/rmannibucau <
> https://github.com/rmannibucau>*
> >>
> >> >>
> >> >>
> >> >> ------------------------------
> >> >>  If you reply to this email, your message will be added to the
> >> discussion
> >> >> below:
> >> >>
> >> >>
> >>
> >>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
> >> >>  To unsubscribe from declare datasource into tomee.xml with variable
> >> env
> >> >> of mysql Openshift, click here<
> >>
> >> >> .
> >> >> NAML<
> >>
> >>
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >> >
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> >>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
> >> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >>
> >> --
> >> *Romain Manni-Bucau*
> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >> *Blog: **http://rmannibucau.wordpress.com/*<
> >> http://rmannibucau.wordpress.com/>
> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> >> <http://fr.linkedin.com/in/rmannibucau>*
> >> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667430.html
> >>  To unsubscribe from declare datasource into tomee.xml with variable
> env
> >> of mysql Openshift, click here<
> >> .
> >> NAML<
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667462.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667463.html
>  To unsubscribe from declare datasource into tomee.xml with variable env
> of mysql Openshift, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667464.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by Romain Manni-Bucau <rm...@gmail.com>.
= is optional but makes things clearer
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-03 mauro2java2011 <ma...@gmail.com>:
> From
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
> It usr the sign = for set properties of datasource
>
> http://tomee.apache.org/datasource-config.html
> Il giorno 02/feb/2014 08.29, "Romain Manni-Bucau [via OpenEJB]" <
> ml-node+s979440n4667430h5@n4.nabble.com> ha scritto:
>
>> It is designed for 1.6 yes.
>>
>> peenshift only exposes http port so jms is not accessible by default
>> outside of the cartridge
>>
>> jndi lookup should work this way
>>
>> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667430&i=0>>
>> a
>> écrit :
>>
>> > veri very interessant. The link of tomee quickstart ,but i you ask:
>> > 1) it is tomee 1.6.0 web or plus version????
>> > 2) i have view taht on tomee  JMS it is bind at port 67606  or some like
>> .
>> > it work also on openshift ????? i can call jms openshift application
>>  with
>> > JNDI from a remote application  ??????
>> > 3) on tomee deployed at openshift , it is possible call EJB remote from
>> > remote client standalone or from other tomee remote?
>> > i have to call at http://namehostonopenshift/nameofapplication/tomee/ejb
>> > ??????
>> > not on port 8080 but at port 80 for get the JNDI context from
>> remote?????
>> > 4) whi the variables env work on resources.xml and on tomee it is
>> > necessaire hook file ?
>> > tank you .
>> >
>> >
>> >
>> >
>> > 2014-02-01 Romain Manni-Bucau [via OpenEJB] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4667430&i=1>>:
>> >
>> >> I dont recall in tomee.xml but resources.xml should support env var
>> too.
>> >>
>> >> Fyi openshift has tomee integration if you host it
>> >>
>> >>
>>
>> https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
>> >>
>> >>
>>
>> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
>> >>
>> >> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
>>
>> >> a
>> >> écrit :
>> >>
>> >> > hi. i would i*install tomee* with diy into openshift. from :
>> >> >
>> >> > https://github.com/openshift-quickstart/openshift-tomcat-quickstart
>> >> > <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
>>
>> >> >
>> >> > ON openshift i would active  also mysql  .
>> >> >
>> >> > From openshift i can get the value of variable env of db and other .
>> >> >
>> >> > https://www.openshift.com/page/openshift-environment-variables
>> >> > <https://www.openshift.com/page/openshift-environment-variables>
>> >> >
>> >> > NOw i would create into tomee.xml a Reosuce for a datasource without
>> >> hard
>> >> > code the value , but use the variable env .
>> >> >
>> >> > Like i have to make it?
>> >> > i have to export a Variable env woth the -Dproerties that reference
>> at
>> >> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
>> >> > $(nameofsystempropetriessettovariableexported)
>> >> >  ?
>> >> >
>> >> >
>> >> > example:
>> >> > openshift variables available for mysql:
>> >> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
>> >> address to use to
>> >> > connect to
>> >> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server
>> is
>>
>> >> listening on
>> >> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
>> >> username
>> >> > OPENSHIFT_MYSQL_DB_PASSWORD
>> >> >
>> >> >
>> >> > into the
>> >> > openshift-tomcat-quickstart /.openshift /action_hooks /start file
>> that
>> >> it
>> >> is
>> >>
>> >> > called from the openshift when i push , i have to add:
>> >> >
>> >> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
>> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
>> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
>> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
>> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
>> >> >
>> >> >  FOR get the values into java  system properties -
>> >> >
>> >> > And into the tomee.xml , into the declaration of resource of db:
>> >> >
>> >> > <Resource id="myapp_mysqDBl" type="DataSource">
>> >> >   JdbcDriver  com.mysql.jdbc.Driver
>> >> >   JdbcUrl   ${mydburl}
>> >> >   UserName    ${mydbusername}
>> >> >   Password  ${mydbpassword}
>> >> >   JtaManaged true
>> >> > </Resource>
>> >> >
>> >> > Then  from the persistence.xmol into my web apps i reference only
>> with
>> :
>>
>> >> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
>> >> >
>> >> > PLEase the procedure it is correct of
>> >> >
>> >> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
>> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
>> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
>> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
>> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
>> >> > and referecne at properties int othe tomee.xml  ?
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> >>
>>
>> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
>>
>> >> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>> >> >
>> >>
>> >> --
>> >> *Romain Manni-Bucau*
>> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> >> *Blog: **http://rmannibucau.wordpress.com/*<
>> >> http://rmannibucau.wordpress.com/>
>> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
>> >> <http://fr.linkedin.com/in/rmannibucau>*
>> >> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>>
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>>
>> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
>> >>  To unsubscribe from declare datasource into tomee.xml with variable
>> env
>> >> of mysql Openshift, click here<
>>
>> >> .
>> >> NAML<
>>
>> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>> >
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>>
>> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
>> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>> --
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
>> <http://fr.linkedin.com/in/rmannibucau>*
>> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667430.html
>>  To unsubscribe from declare datasource into tomee.xml with variable env
>> of mysql Openshift, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=>
>> .
>> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667462.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by mauro2java2011 <ma...@gmail.com>.
From
https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
It usr the sign = for set properties of datasource

http://tomee.apache.org/datasource-config.html
Il giorno 02/feb/2014 08.29, "Romain Manni-Bucau [via OpenEJB]" <
ml-node+s979440n4667430h5@n4.nabble.com> ha scritto:

> It is designed for 1.6 yes.
>
> peenshift only exposes http port so jms is not accessible by default
> outside of the cartridge
>
> jndi lookup should work this way
>
> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667430&i=0>>
> a
> écrit :
>
> > veri very interessant. The link of tomee quickstart ,but i you ask:
> > 1) it is tomee 1.6.0 web or plus version????
> > 2) i have view taht on tomee  JMS it is bind at port 67606  or some like
> .
> > it work also on openshift ????? i can call jms openshift application
>  with
> > JNDI from a remote application  ??????
> > 3) on tomee deployed at openshift , it is possible call EJB remote from
> > remote client standalone or from other tomee remote?
> > i have to call at http://namehostonopenshift/nameofapplication/tomee/ejb
> > ??????
> > not on port 8080 but at port 80 for get the JNDI context from
> remote?????
> > 4) whi the variables env work on resources.xml and on tomee it is
> > necessaire hook file ?
> > tank you .
> >
> >
> >
> >
> > 2014-02-01 Romain Manni-Bucau [via OpenEJB] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4667430&i=1>>:
> >
> >> I dont recall in tomee.xml but resources.xml should support env var
> too.
> >>
> >> Fyi openshift has tomee integration if you host it
> >>
> >>
>
> https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
> >>
> >>
>
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
> >>
> >> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
>
> >> a
> >> écrit :
> >>
> >> > hi. i would i*install tomee* with diy into openshift. from :
> >> >
> >> > https://github.com/openshift-quickstart/openshift-tomcat-quickstart
> >> > <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
>
> >> >
> >> > ON openshift i would active  also mysql  .
> >> >
> >> > From openshift i can get the value of variable env of db and other .
> >> >
> >> > https://www.openshift.com/page/openshift-environment-variables
> >> > <https://www.openshift.com/page/openshift-environment-variables>
> >> >
> >> > NOw i would create into tomee.xml a Reosuce for a datasource without
> >> hard
> >> > code the value , but use the variable env .
> >> >
> >> > Like i have to make it?
> >> > i have to export a Variable env woth the -Dproerties that reference
> at
> >> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
> >> > $(nameofsystempropetriessettovariableexported)
> >> >  ?
> >> >
> >> >
> >> > example:
> >> > openshift variables available for mysql:
> >> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
> >> address to use to
> >> > connect to
> >> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server
> is
>
> >> listening on
> >> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
> >> username
> >> > OPENSHIFT_MYSQL_DB_PASSWORD
> >> >
> >> >
> >> > into the
> >> > openshift-tomcat-quickstart /.openshift /action_hooks /start file
> that
> >> it
> >> is
> >>
> >> > called from the openshift when i push , i have to add:
> >> >
> >> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
> >> >
> >> >  FOR get the values into java  system properties -
> >> >
> >> > And into the tomee.xml , into the declaration of resource of db:
> >> >
> >> > <Resource id="myapp_mysqDBl" type="DataSource">
> >> >   JdbcDriver  com.mysql.jdbc.Driver
> >> >   JdbcUrl   ${mydburl}
> >> >   UserName    ${mydbusername}
> >> >   Password  ${mydbpassword}
> >> >   JtaManaged true
> >> > </Resource>
> >> >
> >> > Then  from the persistence.xmol into my web apps i reference only
> with
> :
>
> >> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
> >> >
> >> > PLEase the procedure it is correct of
> >> >
> >> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
> >> > and referecne at properties int othe tomee.xml  ?
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> >>
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
>
> >> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >> >
> >>
> >> --
> >> *Romain Manni-Bucau*
> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >> *Blog: **http://rmannibucau.wordpress.com/*<
> >> http://rmannibucau.wordpress.com/>
> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> >> <http://fr.linkedin.com/in/rmannibucau>*
> >> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
> >>  To unsubscribe from declare datasource into tomee.xml with variable
> env
> >> of mysql Openshift, click here<
>
> >> .
> >> NAML<
>
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>
> --
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> <http://fr.linkedin.com/in/rmannibucau>*
> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667430.html
>  To unsubscribe from declare datasource into tomee.xml with variable env
> of mysql Openshift, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667462.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by mauro2java2011 <ma...@gmail.com>.
I have read that when i declare datasource into resource.xml or tomee.xml i
have to put the
Username=name usrt
Password=password

But from
http://openejb.apache.org/common-datasource-configurations.html

The sign = it is not present

So i ask the sign = it is necessaire?
Il giorno 02/feb/2014 08.29, "Romain Manni-Bucau [via OpenEJB]" <
ml-node+s979440n4667430h5@n4.nabble.com> ha scritto:

> It is designed for 1.6 yes.
>
> peenshift only exposes http port so jms is not accessible by default
> outside of the cartridge
>
> jndi lookup should work this way
>
> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667430&i=0>>
> a
> écrit :
>
> > veri very interessant. The link of tomee quickstart ,but i you ask:
> > 1) it is tomee 1.6.0 web or plus version????
> > 2) i have view taht on tomee  JMS it is bind at port 67606  or some like
> .
> > it work also on openshift ????? i can call jms openshift application
>  with
> > JNDI from a remote application  ??????
> > 3) on tomee deployed at openshift , it is possible call EJB remote from
> > remote client standalone or from other tomee remote?
> > i have to call at http://namehostonopenshift/nameofapplication/tomee/ejb
> > ??????
> > not on port 8080 but at port 80 for get the JNDI context from
> remote?????
> > 4) whi the variables env work on resources.xml and on tomee it is
> > necessaire hook file ?
> > tank you .
> >
> >
> >
> >
> > 2014-02-01 Romain Manni-Bucau [via OpenEJB] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4667430&i=1>>:
> >
> >> I dont recall in tomee.xml but resources.xml should support env var
> too.
> >>
> >> Fyi openshift has tomee integration if you host it
> >>
> >>
>
> https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
> >>
> >>
>
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
> >>
> >> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
>
> >> a
> >> écrit :
> >>
> >> > hi. i would i*install tomee* with diy into openshift. from :
> >> >
> >> > https://github.com/openshift-quickstart/openshift-tomcat-quickstart
> >> > <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
>
> >> >
> >> > ON openshift i would active  also mysql  .
> >> >
> >> > From openshift i can get the value of variable env of db and other .
> >> >
> >> > https://www.openshift.com/page/openshift-environment-variables
> >> > <https://www.openshift.com/page/openshift-environment-variables>
> >> >
> >> > NOw i would create into tomee.xml a Reosuce for a datasource without
> >> hard
> >> > code the value , but use the variable env .
> >> >
> >> > Like i have to make it?
> >> > i have to export a Variable env woth the -Dproerties that reference
> at
> >> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
> >> > $(nameofsystempropetriessettovariableexported)
> >> >  ?
> >> >
> >> >
> >> > example:
> >> > openshift variables available for mysql:
> >> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
> >> address to use to
> >> > connect to
> >> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server
> is
>
> >> listening on
> >> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
> >> username
> >> > OPENSHIFT_MYSQL_DB_PASSWORD
> >> >
> >> >
> >> > into the
> >> > openshift-tomcat-quickstart /.openshift /action_hooks /start file
> that
> >> it
> >> is
> >>
> >> > called from the openshift when i push , i have to add:
> >> >
> >> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
> >> >
> >> >  FOR get the values into java  system properties -
> >> >
> >> > And into the tomee.xml , into the declaration of resource of db:
> >> >
> >> > <Resource id="myapp_mysqDBl" type="DataSource">
> >> >   JdbcDriver  com.mysql.jdbc.Driver
> >> >   JdbcUrl   ${mydburl}
> >> >   UserName    ${mydbusername}
> >> >   Password  ${mydbpassword}
> >> >   JtaManaged true
> >> > </Resource>
> >> >
> >> > Then  from the persistence.xmol into my web apps i reference only
> with
> :
>
> >> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
> >> >
> >> > PLEase the procedure it is correct of
> >> >
> >> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> >> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> >> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> >> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> >> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
> >> > and referecne at properties int othe tomee.xml  ?
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >>
> >>
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
>
> >> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >> >
> >>
> >> --
> >> *Romain Manni-Bucau*
> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> >> *Blog: **http://rmannibucau.wordpress.com/*<
> >> http://rmannibucau.wordpress.com/>
> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> >> <http://fr.linkedin.com/in/rmannibucau>*
> >> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
> >>  To unsubscribe from declare datasource into tomee.xml with variable
> env
> >> of mysql Openshift, click here<
>
> >> .
> >> NAML<
>
> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >>
> >
> >
> >
> >
> > --
> > View this message in context:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>
> --
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> <http://fr.linkedin.com/in/rmannibucau>*
> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667430.html
>  To unsubscribe from declare datasource into tomee.xml with variable env
> of mysql Openshift, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667461.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by Romain Manni-Bucau <rm...@gmail.com>.
It is designed for 1.6 yes.

peenshift only exposes http port so jms is not accessible by default
outside of the cartridge

jndi lookup should work this way

Le samedi 1 février 2014, mauro2java2011 <ma...@gmail.com> a
écrit :
> veri very interessant. The link of tomee quickstart ,but i you ask:
> 1) it is tomee 1.6.0 web or plus version????
> 2) i have view taht on tomee  JMS it is bind at port 67606  or some like .
> it work also on openshift ????? i can call jms openshift application  with
> JNDI from a remote application  ??????
> 3) on tomee deployed at openshift , it is possible call EJB remote from
> remote client standalone or from other tomee remote?
> i have to call at http://namehostonopenshift/nameofapplication/tomee/ejb
> ??????
> not on port 8080 but at port 80 for get the JNDI context from remote?????
> 4) whi the variables env work on resources.xml and on tomee it is
> necessaire hook file ?
> tank you .
>
>
>
>
> 2014-02-01 Romain Manni-Bucau [via OpenEJB] <
> ml-node+s979440n4667426h81@n4.nabble.com>:
>
>> I dont recall in tomee.xml but resources.xml should support env var too.
>>
>> Fyi openshift has tomee integration if you host it
>>
>>
https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
>>
>>
https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
>>
>> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<
http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
>> a
>> écrit :
>>
>> > hi. i would i*install tomee* with diy into openshift. from :
>> >
>> > https://github.com/openshift-quickstart/openshift-tomcat-quickstart
>> > <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
>> >
>> > ON openshift i would active  also mysql  .
>> >
>> > From openshift i can get the value of variable env of db and other .
>> >
>> > https://www.openshift.com/page/openshift-environment-variables
>> > <https://www.openshift.com/page/openshift-environment-variables>
>> >
>> > NOw i would create into tomee.xml a Reosuce for a datasource without
>> hard
>> > code the value , but use the variable env .
>> >
>> > Like i have to make it?
>> > i have to export a Variable env woth the -Dproerties that reference at
>> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
>> > $(nameofsystempropetriessettovariableexported)
>> >  ?
>> >
>> >
>> > example:
>> > openshift variables available for mysql:
>> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
>> address to use to
>> > connect to
>> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server
is
>> listening on
>> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
>> username
>> > OPENSHIFT_MYSQL_DB_PASSWORD
>> >
>> >
>> > into the
>> > openshift-tomcat-quickstart /.openshift /action_hooks /start file that
>> it
>> is
>>
>> > called from the openshift when i push , i have to add:
>> >
>> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
>> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
>> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
>> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
>> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
>> >
>> >  FOR get the values into java  system properties -
>> >
>> > And into the tomee.xml , into the declaration of resource of db:
>> >
>> > <Resource id="myapp_mysqDBl" type="DataSource">
>> >   JdbcDriver  com.mysql.jdbc.Driver
>> >   JdbcUrl   ${mydburl}
>> >   UserName    ${mydbusername}
>> >   Password  ${mydbpassword}
>> >   JtaManaged true
>> > </Resource>
>> >
>> > Then  from the persistence.xmol into my web apps i reference only with
:
>> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
>> >
>> > PLEase the procedure it is correct of
>> >
>> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
>> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
>> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
>> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
>> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
>> > and referecne at properties int othe tomee.xml  ?
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>>
>>
http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
>> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>> >
>>
>> --
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
>> <http://fr.linkedin.com/in/rmannibucau>*
>> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>>
http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
>>  To unsubscribe from declare datasource into tomee.xml with variable env
>> of mysql Openshift, click here<
http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=
>
>> .
>> NAML<
http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>
>>
>
>
>
>
> --
> View this message in context:
http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

-- 
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau
<http://fr.linkedin.com/in/rmannibucau>*
*Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by mauro2java2011 <ma...@gmail.com>.
veri very interessant. The link of tomee quickstart ,but i you ask:
1) it is tomee 1.6.0 web or plus version????
2) i have view taht on tomee  JMS it is bind at port 67606  or some like .
it work also on openshift ????? i can call jms openshift application  with
JNDI from a remote application  ??????
3) on tomee deployed at openshift , it is possible call EJB remote from
remote client standalone or from other tomee remote?
i have to call at http://namehostonopenshift/nameofapplication/tomee/ejb
??????
not on port 8080 but at port 80 for get the JNDI context from remote?????
4) whi the variables env work on resources.xml and on tomee it is
necessaire hook file ?
tank you .




2014-02-01 Romain Manni-Bucau [via OpenEJB] <
ml-node+s979440n4667426h81@n4.nabble.com>:

> I dont recall in tomee.xml but resources.xml should support env var too.
>
> Fyi openshift has tomee integration if you host it
>
> https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
>
> https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md
>
> Le samedi 1 février 2014, mauro2java2011 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667426&i=0>>
> a
> écrit :
>
> > hi. i would i*install tomee* with diy into openshift. from :
> >
> > https://github.com/openshift-quickstart/openshift-tomcat-quickstart
> > <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
> >
> > ON openshift i would active  also mysql  .
> >
> > From openshift i can get the value of variable env of db and other .
> >
> > https://www.openshift.com/page/openshift-environment-variables
> > <https://www.openshift.com/page/openshift-environment-variables>
> >
> > NOw i would create into tomee.xml a Reosuce for a datasource without
> hard
> > code the value , but use the variable env .
> >
> > Like i have to make it?
> > i have to export a Variable env woth the -Dproerties that reference at
> > $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
> > $(nameofsystempropetriessettovariableexported)
> >  ?
> >
> >
> > example:
> > openshift variables available for mysql:
> > OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
> address to use to
> > connect to
> > OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server is
> listening on
> > OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
> username
> > OPENSHIFT_MYSQL_DB_PASSWORD
> >
> >
> > into the
> > openshift-tomcat-quickstart /.openshift /action_hooks /start file that
> it
> is
>
> > called from the openshift when i push , i have to add:
> >
> > export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
> >
> >  FOR get the values into java  system properties -
> >
> > And into the tomee.xml , into the declaration of resource of db:
> >
> > <Resource id="myapp_mysqDBl" type="DataSource">
> >   JdbcDriver  com.mysql.jdbc.Driver
> >   JdbcUrl   ${mydburl}
> >   UserName    ${mydbusername}
> >   Password  ${mydbpassword}
> >   JtaManaged true
> > </Resource>
> >
> > Then  from the persistence.xmol into my web apps i reference only with :
> > <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
> >
> > PLEase the procedure it is correct of
> >
> > *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> > -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> > -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> > -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> > -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
> > and referecne at properties int othe tomee.xml  ?
> >
> >
> >
> >
> > --
> > View this message in context:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>
> --
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> <http://fr.linkedin.com/in/rmannibucau>*
> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667426.html
>  To unsubscribe from declare datasource into tomee.xml with variable env
> of mysql Openshift, click here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667423&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2Njc0MjN8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423p4667427.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: declare datasource into tomee.xml with variable env of mysql Openshift

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I dont recall in tomee.xml but resources.xml should support env var too.

Fyi openshift has tomee integration if you host it
https://github.com/worldline/openshift-cartridge-tomee/blob/master/README.mdand
https://github.com/worldline/openshift-default-tomee-app/blob/master/README.md

Le samedi 1 février 2014, mauro2java2011 <ma...@gmail.com> a
écrit :
> hi. i would i*install tomee* with diy into openshift. from :
>
> https://github.com/openshift-quickstart/openshift-tomcat-quickstart
> <https://github.com/openshift-quickstart/openshift-tomcat-quickstart>
>
> ON openshift i would active  also mysql  .
>
> From openshift i can get the value of variable env of db and other .
>
> https://www.openshift.com/page/openshift-environment-variables
> <https://www.openshift.com/page/openshift-environment-variables>
>
> NOw i would create into tomee.xml a Reosuce for a datasource without hard
> code the value , but use the variable env .
>
> Like i have to make it?
> i have to export a Variable env woth the -Dproerties that reference at
> $(OPENSHIFT_MYSQL_host , and into tomee.xml referce it with:
> $(nameofsystempropetriessettovariableexported)
>  ?
>
>
> example:
> openshift variables available for mysql:
> OPENSHIFT_MYSQL_DB_HOST         127.0.250.1     The hostname or IP
address to use to
> connect to
> OPENSHIFT_MYSQL_DB_PORT         3306    The port your database server is
listening on
> OPENSHIFT_MYSQL_DB_USERNAME     admin   Your database administrative
username
> OPENSHIFT_MYSQL_DB_PASSWORD
>
>
> into the
> openshift-tomcat-quickstart /.openshift /action_hooks /start file that it
is
> called from the openshift when i push , i have to add:
>
> export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????
>
>  FOR get the values into java  system properties -
>
> And into the tomee.xml , into the declaration of resource of db:
>
> <Resource id="myapp_mysqDBl" type="DataSource">
>   JdbcDriver  com.mysql.jdbc.Driver
>   JdbcUrl   ${mydburl}
>   UserName    ${mydbusername}
>   Password  ${mydbpassword}
>   JtaManaged true
> </Resource>
>
> Then  from the persistence.xmol into my web apps i reference only with :
> <JTA-DATASOURCE>myapp_mysqlDB</JTA_DATASOURCE>
>
> PLEase the procedure it is correct of
>
> *export JAVA_OPTS_EXT="-Dmydbhost=$OPENSHIFT_MYSQL_DB_HOST
> -D=mydbport=$OPENSHIFT_MYSQL_DB_PORT
> -Dmydbusername=$OPENSHIFT_MYSQL_DB_USERNAME
> -Dmydbpassword=$OPENSHIFT_MYSQL_DB_PASSWORD
> -Dmydburl=$OPENSHIFT_MYSQL_DB_URL"  ?????*
> and referecne at properties int othe tomee.xml  ?
>
>
>
>
> --
> View this message in context:
http://openejb.979440.n4.nabble.com/declare-datasource-into-tomee-xml-with-variable-env-of-mysql-Openshift-tp4667423.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

-- 
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau
<http://fr.linkedin.com/in/rmannibucau>*
*Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*