0 Replies Latest reply on Nov 9, 2006 8:56 AM by winterer

    Initialize EMF (Eclipse Modeling Framework) on JBoss

    winterer

      Hello!

      I've got a severy initialization problem using EMF (Eclipse modeling framework) on JBoss.

      For transferring data from the client to the server, I'm using a generic transfer object that "carries" an EMF object. When the transfer object is serialized, it uses the EMF build in XML serialization to serialize its load (the emf object).

      But when the transfer object is unmarshalled on server side, an exception is thrown, because it is required to initialize the EMF package factories first. This is just one line of code, but because the unmarshalling happens before any of my session beans are called (or even loaded by the classloader), I've no idea how to correctly initialize the EMF packages.

      Apart form that it is also necessary to hold a reference to the EMF package factories all over the time to avoid that the classes are unloaded, because all initialization info is held in static fields. (If the classes were unloaded, all initialization info would be gone and all consecutive unmarshalling of my transfer objects would again fail).

      Thanks for your help in advance!
      Mario