Search code examples
eclipselink

EclipseLink - reload metadata


Is there a way to reload EclipseLink metadata in runtime? I wanted to either call some REST that would serve „eclipselink-orm.xml” file - similar to METADATA_SOURCE_XML_URL or somehow refresh that metamodel programmatically - is it possible?


Solution

  • Answering own question:

     refreshMetamodel()
    

    method from JpaEntityManagerFactory class does the job.