Application properties

2014-01-07 Thread Matthias

Hi,

I'm looking for the best way to set global application properties like 
the path to my data directory or the url of my solr server. Currently I 
set them within the contributeApplicationDefaults() method of my modules 
(I have a production and development module). But I don't want to set 
them in Java, because they can change and I have to recompile and 
redeploy my project.


After a google search I found the WEB-INF/app.properties, but the file 
is only for the messages catalog (correct me if im wrong).


Any suggestions?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Application properties

2014-01-07 Thread Bob Harner
You have all the options available to you that any other Java app provides:

1) put name/value pairs in a CONFIGURATION table in the database.

2) put name/value pairs in a property file in a location of your
choosing. Java has built-in features to read property files

3) set system properties or environment variables at the OS level or
in your app's startup script, and read them using standard Java APIs

#1 is my favorite (lots of flexibility; you can even provide a web
interface to edit some of them if desired).

On Tue, Jan 7, 2014 at 12:54 PM, Matthias thegreatme...@gmail.com wrote:
 Hi,

 I'm looking for the best way to set global application properties like the
 path to my data directory or the url of my solr server. Currently I set them
 within the contributeApplicationDefaults() method of my modules (I have a
 production and development module). But I don't want to set them in Java,
 because they can change and I have to recompile and redeploy my project.

 After a google search I found the WEB-INF/app.properties, but the file is
 only for the messages catalog (correct me if im wrong).

 Any suggestions?

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Application properties

2014-01-07 Thread Matthias
I thought that there is a tapestry way of doing this. But if not, I try 
to use the database. I actually never thought of that, so thanks for the 
tip.


On 07.01.2014 19:24, Bob Harner wrote:

You have all the options available to you that any other Java app provides:

1) put name/value pairs in a CONFIGURATION table in the database.

never thought of that, thanks for the tip.


2) put name/value pairs in a property file in a location of your
choosing. Java has built-in features to read property files

3) set system properties or environment variables at the OS level or
in your app's startup script, and read them using standard Java APIs

#1 is my favorite (lots of flexibility; you can even provide a web
interface to edit some of them if desired).

On Tue, Jan 7, 2014 at 12:54 PM, Matthias thegreatme...@gmail.com wrote:

Hi,

I'm looking for the best way to set global application properties like the
path to my data directory or the url of my solr server. Currently I set them
within the contributeApplicationDefaults() method of my modules (I have a
production and development module). But I don't want to set them in Java,
because they can change and I have to recompile and redeploy my project.

After a google search I found the WEB-INF/app.properties, but the file is
only for the messages catalog (correct me if im wrong).

Any suggestions?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANN] JumpStart Preview: for Tapestry 5.4

2014-01-07 Thread Howard Lewis Ship
Looks great!


On Mon, Jan 6, 2014 at 4:44 AM, Lance Java lance.j...@googlemail.comwrote:

 Haha... I did see some similarities. Parts of tapestry-stitch were inspired
 by Jumpstart You scratch my back, I'll scratch yours!
  On 6 Jan 2014 10:00, Geoff Callender 
 geoff.callender.jumpst...@gmail.com
 wrote:

  Thanks Lance. It was, in no small way, inspired by your work with
  tapestry-stitch.
 
 
  On 6 January 2014 20:30, Lance Java lance.j...@googlemail.com wrote:
 
   Nice work! I love the facelift!
  
 




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


[Might be OT] What is the difference between J2EE CDI and Tapestry's IoC ?

2014-01-07 Thread Muhammad Gelbana
The subject says it all, what is the different between CDI (Context and
Dependency Injection) and Tapestry's IoC ? There is a
bug\taskhttps://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=bf2c8a4f09152ef0f10ef788ed17370b540a2670to
be implemented in Tapestry 5.4 that implies adding CDI support to
Tapestry.

Would someone kindly explain what is the difference between Tapestry's IoC
and J2EE's CDI ?

Is it like CDI enables the injection of J2EE specific standards such as
WebServiceContexthttp://docs.oracle.com/javase/7/docs/api/javax/xml/ws/WebServiceContext.html
which
is not a Tapestry service ?

*-*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana


Re: [Might be OT] What is the difference between J2EE CDI and Tapestry's IoC ?

2014-01-07 Thread Lenny Primak
This is somewhat a sensitive subject:

http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Merits-of-Tapestry-IOC-td5721445.html
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/First-stab-at-CDI-module-for-tapestry-td4469281.html
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Differences-between-Tapestry-IoC-and-J2EE-6-CDI-td3412912.html

On Jan 7, 2014, at 4:42 PM, Muhammad Gelbana wrote:

 The subject says it all, what is the different between CDI (Context and
 Dependency Injection) and Tapestry's IoC ? There is a
 bug\taskhttps://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=bf2c8a4f09152ef0f10ef788ed17370b540a2670to
 be implemented in Tapestry 5.4 that implies adding CDI support to
 Tapestry.
 
 Would someone kindly explain what is the difference between Tapestry's IoC
 and J2EE's CDI ?
 
 Is it like CDI enables the injection of J2EE specific standards such as
 WebServiceContexthttp://docs.oracle.com/javase/7/docs/api/javax/xml/ws/WebServiceContext.html
 which
 is not a Tapestry service ?
 
 *-*
 *Muhammad Gelbana*
 http://www.linkedin.com/in/mgelbana


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [Might be OT] What is the difference between J2EE CDI and Tapestry's IoC ?

2014-01-07 Thread Muhammad Gelbana
Thanks a lot for your time taken to collect these links, I appreciate it.
I don't mean to revive a debate, I'll go ahead and read these threads,
thanks again :)

*-*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana


On Wed, Jan 8, 2014 at 12:33 AM, Lenny Primak lpri...@hope.nyc.ny.uswrote:

 This is somewhat a sensitive subject:


 http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Merits-of-Tapestry-IOC-td5721445.html

 http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/First-stab-at-CDI-module-for-tapestry-td4469281.html

 http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Differences-between-Tapestry-IoC-and-J2EE-6-CDI-td3412912.html

 On Jan 7, 2014, at 4:42 PM, Muhammad Gelbana wrote:

  The subject says it all, what is the different between CDI (Context and
  Dependency Injection) and Tapestry's IoC ? There is a
  bug\task
 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=bf2c8a4f09152ef0f10ef788ed17370b540a2670
 to
  be implemented in Tapestry 5.4 that implies adding CDI support to
  Tapestry.
 
  Would someone kindly explain what is the difference between Tapestry's
 IoC
  and J2EE's CDI ?
 
  Is it like CDI enables the injection of J2EE specific standards such as
  WebServiceContext
 http://docs.oracle.com/javase/7/docs/api/javax/xml/ws/WebServiceContext.html
 
  which
  is not a Tapestry service ?
 
  *-*
  *Muhammad Gelbana*
  http://www.linkedin.com/in/mgelbana


 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: Application properties

2014-01-07 Thread Rural Hunter
You can also put it in web.xml and access it in your pages/services via 
injected symbol.


于 2014/1/8 3:15, Matthias 写道:
I thought that there is a tapestry way of doing this. But if not, I 
try to use the database. I actually never thought of that, so thanks 
for the tip.


On 07.01.2014 19:24, Bob Harner wrote:
You have all the options available to you that any other Java app 
provides:


1) put name/value pairs in a CONFIGURATION table in the database.

never thought of that, thanks for the tip.


2) put name/value pairs in a property file in a location of your
choosing. Java has built-in features to read property files

3) set system properties or environment variables at the OS level or
in your app's startup script, and read them using standard Java APIs

#1 is my favorite (lots of flexibility; you can even provide a web
interface to edit some of them if desired).





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org