You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Patrick Moore (JIRA)" <hi...@jakarta.apache.org> on 2007/02/14 00:07:06 UTC
[jira] Created: (HIVEMIND-196) Cannot create an interceptor for
services have an interface that is not a java interface.
Cannot create an interceptor for services have an interface that is not a java interface.
-----------------------------------------------------------------------------------------
Key: HIVEMIND-196
URL: https://issues.apache.org/jira/browse/HIVEMIND-196
Project: HiveMind
Issue Type: Bug
Affects Versions: 1.1.1
Reporter: Patrick Moore
Priority: Minor
This may be the same as Hivemind-120 but the description seems different.
If I have an interceptor factory like this:
@SuppressWarnings("unused")
public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters) {
Object delegate = stack.peek();
InvocationHandler handler = new TransactionalInterceptor(delegate);
Object interceptor =
Proxy.newProxyInstance(
invokingModule.getClassResolver().getClassLoader(),
new Class[] { stack.getServiceInterface()},
handler);
stack.push(interceptor);
}
It will fail on the newProxyInstance because the classloader for the generated stack.getServiceInterface() class is different than the class loader supplied by "invokingModule.getClassResolver().getClassLoader()".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVEMIND-196) Cannot create an interceptor for
services have an interface that is not a java interface.
Posted by "Patrick Moore (JIRA)" <hi...@jakarta.apache.org>.
[ https://issues.apache.org/jira/browse/HIVEMIND-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Moore updated HIVEMIND-196:
-----------------------------------
Description:
This may be the same as Hivemind-120 but the description seems different.
For a definition:
<service-point id="testwrapped1" interface="com.transparentpolitics.core.persistence.FakeServiceImpl">
<invoke-factory>
<construct class="com.transparentpolitics.core.persistence.FakeServiceImpl"/>
</invoke-factory>
<interceptor service-id="transparentpolitics.persistence.transactionalInterceptor"/>
</service-point>
If I have an interceptor factory like this:
@SuppressWarnings("unused")
public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters) {
Object delegate = stack.peek();
InvocationHandler handler = new TransactionalInterceptor(delegate);
Object interceptor =
Proxy.newProxyInstance(
invokingModule.getClassResolver().getClassLoader(),
new Class[] { stack.getServiceInterface()},
handler);
stack.push(interceptor);
}
It will fail on the newProxyInstance because the classloader for the generated stack.getServiceInterface() class ($$$FakeServiceImpl) is different than the class loader supplied by "invokingModule.getClassResolver().getClassLoader()".
was:
This may be the same as Hivemind-120 but the description seems different.
If I have an interceptor factory like this:
@SuppressWarnings("unused")
public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters) {
Object delegate = stack.peek();
InvocationHandler handler = new TransactionalInterceptor(delegate);
Object interceptor =
Proxy.newProxyInstance(
invokingModule.getClassResolver().getClassLoader(),
new Class[] { stack.getServiceInterface()},
handler);
stack.push(interceptor);
}
It will fail on the newProxyInstance because the classloader for the generated stack.getServiceInterface() class is different than the class loader supplied by "invokingModule.getClassResolver().getClassLoader()".
> Cannot create an interceptor for services have an interface that is not a java interface.
> -----------------------------------------------------------------------------------------
>
> Key: HIVEMIND-196
> URL: https://issues.apache.org/jira/browse/HIVEMIND-196
> Project: HiveMind
> Issue Type: Bug
> Affects Versions: 1.1.1
> Reporter: Patrick Moore
> Priority: Minor
>
> This may be the same as Hivemind-120 but the description seems different.
> For a definition:
> <service-point id="testwrapped1" interface="com.transparentpolitics.core.persistence.FakeServiceImpl">
> <invoke-factory>
> <construct class="com.transparentpolitics.core.persistence.FakeServiceImpl"/>
> </invoke-factory>
> <interceptor service-id="transparentpolitics.persistence.transactionalInterceptor"/>
> </service-point>
> If I have an interceptor factory like this:
> @SuppressWarnings("unused")
> public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters) {
> Object delegate = stack.peek();
> InvocationHandler handler = new TransactionalInterceptor(delegate);
> Object interceptor =
> Proxy.newProxyInstance(
> invokingModule.getClassResolver().getClassLoader(),
> new Class[] { stack.getServiceInterface()},
> handler);
> stack.push(interceptor);
> }
> It will fail on the newProxyInstance because the classloader for the generated stack.getServiceInterface() class ($$$FakeServiceImpl) is different than the class loader supplied by "invokingModule.getClassResolver().getClassLoader()".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.