Bugs item #532263, was opened at 2002-03-20 00:21
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=532263&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Ignacio Coloma (alu1344)
Assigned to: Nobody/Anonymous (nobody)
Summary: ClientContainer not assigning principal
Initial Comment:
Lately validation of principal in my app started to
fail spontaneously (exception saying that "principal =
null"). I have been checking it and have arrived at
the following:
ClientContainer.java, line 86:
=============================
public Object invoke(final Object proxy,
final Method m,
Object[] args)
throws Throwable
{
// Normalize args to always be an array
// Isn't this a bug in the proxy call??
if (args == null)
args = EMPTY_ARGS;
//Create the invocation object
Invocation invocation = new Invocation();
// Contextual information for the interceptors
invocation.setInvocationContext(context);
invocation.setObjectName(context.getObjectName
());
invocation.setMethod(m);
invocation.setArguments(args);
// send the invocation down the client
interceptor chain
return next.invoke(invocation);
}
As you can see, the principal is not being propagated.
In Invocation.java, line 243:
/**
* marcf: SCOTT WARNING! I removed
the "setPrincipal" that was called here
*/
I suppose you should call it by hand or call the
appropiate constructor. I have been comparing the
ClientContainer with BaseLocalContainerInvoker, that
has the same method implemented this way:
public Object invoke(Object id, Method m, Object[]
args )
throws Exception
{
// Set the right context classloader
ClassLoader oldCl = Thread.currentThread
().getContextClassLoader();
Thread.currentThread().setContextClassLoader
(container.getClassLoader());
try
{
return container.invoke(new Invocation(id, m,
args, getTransaction(),
getPrincipal(), getCredential()));
}
As you can see, here the Invocation gets instantiated
providing the Principal and Credential, that gets both
assigned in.
What puzzles me is that this thing doesn't fail every
time but only one of three calls (more or less).
Happens when instantiating a session bean (remote
interface) from a Jetty server in unauthenticated
folder of my webapp.
Regards, and congrats for a great product.
----------------------------------------------------------------------
>Comment By: Ignacio Coloma (alu1344)
Date: 2002-03-20 10:53
Message:
Logged In: YES
user_id=376362
Sorry for the inconvenience. My machine should have been in
unstable state. I have not changed one line of code (even
haven't deployed again) and it now works correctly. Sorry
again.
----------------------------------------------------------------------
Comment By: marc fleury (mnf999)
Date: 2002-03-20 00:44
Message:
Logged In: YES
user_id=174548
Ignacio,
I know I recommended you log this but upon reading your
report I realize that you are looking at the wrong place.
ClientContainer is not supposed to do the security stuff,
the setup of interceptors in the client is
ClientContainer->TxInterceptor->SecurityInterceptor
(client side so org.jboss.proxy).
Also they seem to pass the tests so it could be that there
is a problem with your security?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=532263&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development