Results 1 to 4 of 4

Thread: Accessing the Service from Slice WAR

Threaded View

  1. #1
    Join Date
    Jul 2009
    Location
    Hyderabad India
    Posts
    56

    Default Accessing the Service from Slice WAR

    I am facing another issue with Slices.

    /WEB-INF/applicationContext.xml (which has Spring-DM’s <reference ... />) is not getting loaded even after having the following lines into the slice web.xml.

    Code:
    <context-param>
      <param-name>contextClass</param-name>
       <param-value> 
            com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext
      </param-value>
    </context-param>
    
    <listener>
    <listener-class>
       org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    The same works fine for Host WAR.

    I am attaching the sample WARs for your reference.

    common.jar – Exposes OSGi service (<osgi:service …..>)

    travelAgent.war – Host WAR refers the service exposed by common.jar (<osgi:reference ….>) [works fine]

    flightReservation.war – Slice WAR refers the service exposed by common.jar (<osgi:reference ….>) [Not able to autowire beans defined in applicationContext.xml. It means that applicationContext.xml is not getting loaded. Gives error that “No matching bean found”]

    Please let me know if this is the correct way to refer an OSGi service from slice WAR?
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •