[Geoserver-devel] Access to GeoServerApplication from OWS service

I happen to have an ows service that is intended to recieve some parameters from client (i.e. layers to display in OpenLayers),
also i have an infrastructure that generates requested data inside geoserver. At some point i faced a problem that i can’t create
some utility classes because they are pages. I get an error about “There is no application attached to current thread” and that
makes sense as service is created as bean in application context and have only reference to Geoserver passed to it. As i know we
can get GeoServer from GeoServerApplication via properties, maybe there is some way to do vice versa? Or some workaround maybe…
I understand that solution to a problem is in rewriting utility classes as standalone and call them from both pages and service, but at
this point we don’t have time for this. Thanks in advance.

What utility classes in particular are you looking for? Generally all service code sits beneath the web tier. So your web tier should depend on your service tier, not vice versa.

Anyways, if you can provide a bit more details about your use case i am sure we can help.

-Justin

2011/2/9 Sky Line <sky.l1ne@anonymised.com…241…>

I happen to have an ows service that is intended to recieve some parameters from client (i.e. layers to display in OpenLayers),
also i have an infrastructure that generates requested data inside geoserver. At some point i faced a problem that i can’t create
some utility classes because they are pages. I get an error about “There is no application attached to current thread” and that
makes sense as service is created as bean in application context and have only reference to Geoserver passed to it. As i know we
can get GeoServer from GeoServerApplication via properties, maybe there is some way to do vice versa? Or some workaround maybe…
I understand that solution to a problem is in rewriting utility classes as standalone and call them from both pages and service, but at
this point we don’t have time for this. Thanks in advance.


The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.