its a custom service... i created it in my project

sorry for the misunderstanding

g,
kris



p.stavrini...@albourne.com 
27.07.2009 12:23
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@tapestry.apache.org>
Kopie

Thema
Re: Tapestry 5 IoC Eagerloading and ordering of services







Hi Kristian,

Could you please point me to the JavaDoc of this service?

Thanks,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the 
sender, delete it and do not read, act upon, print, disclose, copy, retain 
or redistribute it. Please visit http://www.albourne.com/email.html for 
important additional terms relating to this e-mail.

----- Original Message -----
From: "Peter Stavrinides" <p.stavrini...@albourne.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Monday, 27 July, 2009 12:57:56 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5 IoC Eagerloading and ordering of services

I added a documentation enhancement request:
https://issues.apache.org/jira/browse/TAP5-795

Thanks again,
Peter

----- Original Message -----
From: "P Stavrinides" <p.stavrini...@albourne.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Monday, 27 July, 2009 12:45:29 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5 IoC Eagerloading and ordering of services

Thanks Kristian!

Thats good enough for me, I think the documentation should include this 
point though.

Cheers,
Peter

----- Original Message -----
From: "Kristian Marinkovic" <kristian.marinko...@porsche.co.at>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Monday, 27 July, 2009 11:50:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5 IoC Eagerloading and ordering of services

hi Peter,

because i couldn't control the ordering of eager load services 
i stated that no developer may define an eager load service
himself. instead i created an eager load service (StartupInitializer)
that accepts an orderedconfiguration of initializers every 
developer must contribute to.

g,
kris




p.stavrini...@albourne.com 
27.07.2009 09:55
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@tapestry.apache.org>
Kopie

Thema
Re: Tapestry 5 IoC Eagerloading and ordering of services







Hi,

Before I open a jira for this I have devised an coded example to 
illustrate it, and hopefully get some comments:

//Example: The shell of an eagerloaded service 
public class ImageService {

                 /** Cache to hold thumbnail images */
                 private static ConcurrentHashMap<Integer, Thumbnail> 
imageCache_ = new ConcurrentHashMap<Integer, Thumbnail>();

 
                 public void preloadImageCache() {
                                 DbConnection connection = null;
                                 try {
                        //Sometimes this turns into a Null Pointer 
Exception as another eagerloaded service sets up the connection pool etc.
                        //this service should start up after that one, but 

this is not always the case in practice??
                                                 connection = 
DatabaseConnection.getReadConnection();
                                                 //database query
                                 } catch (Exception e) {
                                                 //handle exception
                                 }
                 }


                 public static ImageService build() {
                                 return new ImageService();
                 }

                 public ImageService() {
                                 preloadImageCache();
                 }
 }

//Workaround: adding a dependency on the other eagerloaded service solves 
it, but this is not a practical solution if there are many of these 
services
public class ImageService {

                 /** Cache to hold thumbnail images */
                 private static ConcurrentHashMap<Integer, Thumbnail> 
imageCache_ = new ConcurrentHashMap<Integer, Thumbnail>();

 
                 public void preloadImageCache() {
                                 DbConnection connection = null;
                                 try {
                                                 connection = 
DatabaseConnection.getReadConnection();
                                                 //database query
                                 } catch (Exception e) {
                                                 //handle exception
                                 }
                 }


                 public static ImageService build(SiteInitialise 
siteInitialise) {
                                 return new ImageService(siteInitialise);
                 }

                 public ImageService(SiteInitialise siteInitialise) {
                                 if(siteInitialise.isConnectionOk())
                                                 preloadImageCache();
                 }
 }

If there is a way to ensure the ordering of eagerloaded services, then 
this is not an issue, perhaps this is a regression from the fix to 
http://issues.apache.org/jira/browse/TAPESTRY-2267 ? otherwise I am 
surprised that others have not come across this, perhaps I have missed 
something?

Cheers,
Peter


----- Original Message -----
From: "Peter Stavrinides" <p.stavrini...@albourne.com>
To: "Tapestry Mailing List" <users@tapestry.apache.org>
Sent: Friday, 24 July, 2009 15:59:20 GMT +02:00 Athens, Beirut, Bucharest, 

Istanbul
Subject: Tapestry 5 IoC Eagerloading and ordering of services

Hi everyone,

Is it possible to control the ordering of eagerloaded IoC services, 
especially if the services exist is separate but dependent IoC modules.

I found an issue http://issues.apache.org/jira/browse/TAPESTRY-2267 that 
states these service proxies are claimed and loaded collectively, however 
no mention is made of how to ensure the correct ordering of these claimed 
services?

Any help with this would be greatly appreciated.

Kind regards,
Peter

 

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Reply via email to