Announcement Announcement Module
Collapse
No announcement yet.
Load Resource From EJB MessageDrivenBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load Resource From EJB MessageDrivenBean

    I try to load a Resource in a MessageDrivenBean EJB component.
    I try to load an XSD file.

    Using "ClassPathResource" the file is not found.
    <bean id="xsdFile" class="java.lang.String">
    <constructor-arg value="classpath:message.xsd" />
    </bean>

    Using FileSystemResource it's working but it's dirty. And it's no more in the jar file.
    <bean id="xsdFile" class="java.lang.String">
    <constructor-arg value="file:/pathtofile/message.xsd" />
    </bean>

    I will try to embedded this file in the JAR referenced in classpath. Is there other way to proceed ?

    Thanks for any help.

  • #2
    It is generally not a good idea to load web resources from disk. Do you have a permissions issue? You probably need to package the .xsd in a jar file, stick the jar on the classpath, and make sure you have a manifest entry for the file.

    Comment

    Working...
    X