How to find all available orbeon-application/resources

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find all available orbeon-application/resources

Heinrich Götzger
Salute,

How can I find all installed orbeon-applications?

Or, how can I find all available page-flows/resources in their environment?

We have roughly the following setup:

A WAR file containing most of orbeon-form-runner (a stripped orbeon.war)
plus other application-relevant-code and all X-forms modules, fragments,
actions, processors and so on, is installed in the tomcat webapps directory.
Our application specific X-Forms packages reside in separate JAR files which
will be installed optionally in the libs-directory in tomcat. The resource
manager is configured (default-setting in orbeon.war) to read first the
classloader and then the WebApp resources.

Now I'd like to know on startup which resources (page-flows?) are available
in my particular installation and which are missing. The general WAR is
always there and contains includes that may be used by the X-forms in the
JARs files. This has been working just fine for a while now.

The requirement to do it the other way around is giving me headaches though,
since the JARs may or may not be there, but we need to reference/include
them from the WAR file. For example to display a homepage with all the
X-Forms the customer has in the tomcat libs directory - each included in one
tab of a tabview.

My first approximation to get the information, is to manually load all
resources which I know might exist with regular JVM-classloader and thereby
gather information on all available resources/page-flows that are installed.
I'm wondering if there is a more flexible and more elegant approach? It
would be sufficient to refresh the information at application startup.

Thanks for sharing some thoughts.

Cheers

Heinrich

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: How to find all available orbeon-application/resources

Erik Bruchez
Administrator
Heinrich,

Your approach sounds right, because the resource manager API doesn't have a search function. So you must try to poke at the resources to try to find them.

You could, by writing Java code, try to access the JAR files and enumerate their content. This seems to be possible at least in some cases:

http://stackoverflow.com/questions/7953600/list-of-resources-in-a-folder-of-jar-file

-Erik