On Tue, Jun 3, 2014 at 10:33 AM, Tom Kunicki <[email protected]>
wrote:

> Hi,
>
> I'm trying to register a new ProcessFactory in order to generate a new
> namespace for custom WPS proessess.
>
> I've dug into wps-core and looked at the applicationContext.xml
>
> From that i've found that I should create a new marker interface for my
> processes to inherit from them register a newly parametrized instance of 
> org.geoserver.wps.jts.SpringBeanProcessFactory
> in my jar's applicationContext.xml below.
>
> <beans xmlns="http://www.springframework.org/schema/beans";
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xsi:schemaLocation="http://www.springframework.org/schema/beans
>     http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>
>
>     <bean id="nwsProcessFactory"
> class="org.geoserver.wps.jts.SpringBeanProcessFactory">
>         <constructor-arg index="0" value="NWS specific processes"/>
>         <constructor-arg index="1" value="nws"/>
>         <constructor-arg index="2"
> value="com.twc.geoserver.wps.NWSProcess"/>
>     </bean>
>
>     <bean id="ugcFeatureProcess"
> class="com.twc.geoserver.wps.UGCFeatureProcess">
>         <constructor-arg ref="catalog"/>
>     </bean>
>
> </beans>
>
> The process is defined as such:
>
> package ...
> import ...
>
> @DescribeProcess(
>     title = "UGC to Feature Converter",
>     description = "Converts a NOAA UGC code to corresponding features",
>     version = "1.0")
> public class UGCFeatureProcess implements NWSProcess { ... }
>
> But after all this I can't get the processes to register with the new
> namespace.  I have to revert the inheritance to GeoServerProcess...
>
> Should this work? I saw earlier in the wps-core application context some
> depends-on flags for WPSInfo relating to other bean factories.  Is my
> factory being instaniated too late to be captured?
>

That's not the issue, the factory ends up being registere in SPI, which
uses the class names as
the discriminant, so it's not possible to have two SpringBeanProcessFactory
around.
Long story short, you have to subclass SpringBeanProcessFactory and create
also your own
factory for it to work

Cheers
Andrea


-- 
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to