The Assembler can run in process as part of a Java application that powers a Web site, or it can be deployed as a standalone servlet. Non-Java applications must use the Assembler servlet.

The Tools and Frameworks package includes an example of each deployment mode in /reference/discover-electronics (for the Assembler running in process) and /reference/discover-service (for the standalone Assembler servlet). The standalone servlet, or Assembler Service, provides a RESTful interface for Assembler queries that returns results in either JSON or XML.

Both deployment modes depend on a Spring context file for application-specific configuration. The deployment descriptor files for the reference implementations specify a context file located in /WEB-INF/assembler-context.xml, as follows:

<listener>
  <listener-class>
    org.springframework.web.context.ContextLoaderListener
  </listener-class>
</listener>
<listener>
  <listener-class>
    org.springframework.web.context.request.RequestContextListener
  </listener-class>
</listener>
<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/assembler-context.xml</param-value>
</context-param>

Copyright © Legal Notices