Hi,
 have a question about the way how an OData instance is instantiated
using the current API.

Currently, the OData.newInstance() method of server-api tries to load
ODataImpl of server-core using its classloader. For this to work,
server-api needs a dependency to server-core and since server-core has
dependency to server-api, there will be a cyclic dependency.

One way to avoid this would be to use TCCL first to load the class if
this is set, which is a normal jee approach. In this way, all jee apps
will work and modular apps like OSGi will then need to explicitly
assign its bundle classloader to its TCCL. But in any case, they will
both work in this case without creating a cyclic dependency between
server-api and server-core.

Another approach would be to change this interface so that you can
pass the impl name along with its classloader to load this class.

I am wondering if something of this kind of customization is planned.
In other case, I think it would be a good idea to add the TCCL based
classloading in newInstance() method, as this requires no practical
change.

How do you think?

Thanks.
regards, aki

Reply via email to