开发者

WebOrb / Spring integration not working

I've tried copying the weborb config files across to an existing Spring app, and for some reason my spring services aren't being exposed to WebOrb.

I don't see the spring services shown in the WebOrb console, and when I hit the server methods, I get instances of the service that aren't spring wired.

Although this app uses spring annotations heavily, I've tried hitting my services declared in the following ways (always trying to hit "servicesFacade" as my destination):

@Service
public class ServicesFacade ...

@Service("servicesFacade")
public class ServicesFacade ...

<bean id="servicesFacade" class="com.mangofactory.grapevine.service.ServicesFacade" />

I must have missed a config step, but I've compared everything with the example, and can't think what it is.

** Note - I haven't copied any other jars from the web-orb folder (notably, I've exlcuded the spring jars), as I already have a working Spring 3.0 install running on my web app. Could this be the cause?

Steps taken:

Copied from %WEBORB_INSTALL%:

  • /webapp/WEB-INF/classes -> WEB-INF/classes
  • /webapp/WEB-INF/flex -> WEB-INF/flex
  • /webapp/WEB-INF/lib/weborb.jar & jdom-1.1.jar -> WEB-INF/lib

Updated web.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">
    <display-name>Grapevine</display-name>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/applicationContext.xml
        </param-value>
    </context-param>
    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>

    <filter>
        <filter-name>openSessionInViewFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>openSessionInViewFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>weborb.ORBServletContextListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>grapevine</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>weborb</servlet-name>
        <servlet-class>weborb.ORBServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>rds</servlet-name>
        <servlet-class>weborb.rds.handler.FrontEndHttpServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>grapevine</servlet-name>
        <url-pattern>/app/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>weborb</servlet-name>
        <url-pattern>*.wo</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>rds</servlet-name>
        <url-pattern>/rds.wo</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

I have the following spring-related classes in my lib folder:

org.springframework.aop-3.0.4.RELEASE.jar
org.springframework.asm-3.0.4.RELEASE.jar
org.springframework.beans-3.0.4.RELEASE.jar
org.springframework.context-3.0.4.RELEASE.jar
org.springframework.context.support-3.0.4.RELEASE.jar
org.springframework.core-3.0.4.RELEASE.jar
org.springframework.expression-3.0.4.RELEASE.jar
org.springframework.jdbc-3.0.4.RELEASE.jar
org.springframework.jms-3.0.4.RELEASE.jar
org.springframewor开发者_运维问答k.orm-3.0.4.RELEASE.jar
org.springframework.oxm-3.0.4.RELEASE.jar
org.springframework.security.config-3.0.3.RELEASE.jar
org.springframework.security.core-3.0.3.RELEASE.jar
org.springframework.security.web-3.0.3.RELEASE.jar
org.springframework.transaction-3.0.4.RELEASE.jar
org.springframework.web-3.0.4.RELEASE.jar
org.springframework.web.portlet-3.0.4.RELEASE.jar
org.springframework.web.servlet-3.0.4.RELEASE.jar
spring-flex-1.0.3.RELEASE.jar

Any help would be greatly appreciated

Marty


Please check if your weborb-config.xml (it is in WEB-INF/classes) contains the following line:

&lt;serviceInvoker&gt;weborb.handler.SpringBeanHandler&lt;/serviceInvoker&gt;

Mark

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜