Skip to content

Conversation

marko-bekhta
Copy link
Member

I am opening this as a draft just to share.

That's what I ended up with to make that work .... and since we don't have a dependency on OSGi in the engine (and we wouldn't want that one, right ?! 😄) I ended up with some reflection... which is essentially doing this:

	ClassLoader classLoaderForExpressionFactory() {
		for ( Bundle bundle : FrameworkUtil.getBundle( ResourceBundleMessageInterpolator.class ).getBundleContext().getBundles() ) {
			try {
				return bundle.loadClass( "com.sun.el.ExpressionFactoryImpl" ).getClassLoader();
			}
			catch (ClassNotFoundException e) {
				// ignore
			}
		}
		return null;
	}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Nov 12, 2024

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HV-\d+
    ↳ Offending commits: [e1bb72a]

› This message was automatically generated.

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a lot of work / complexity for what was only supposed to be a workaround, but... Assuming tests pass here, and your merge this in main only (where we can't run tests on OSGi :x), fine by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants