// nothing to do
}
private void deliverRequest( ServerRequest request )
{
POA tmp_poa = rootPOA;
List<String> scopes;
//MIOP reception of messages from group
TagGroupTaggedComponent tagGroup = request.getTagGroup();
if(tagGroup != null)
{
((GOA)rootPOA).processGroupRequest(tagGroup,request);
return;
}
try
{
// This is similar to code within ORB::findPOA but
// sufficiently different that it is reproduced here.
String refImplName = "";
final String orbImplName = orb.getImplName();
final String orbServerId = orb.getServerIdString();
try
{
refImplName =
org.jacorb.poa.util.POAUtil.extractImplName( request.objectKey() );
}
catch( org.jacorb.poa.except.POAInternalError pie )
{
logger.debug
("serverRequestListener: reference generated by foreign POA");
}
if( !(orbImplName.equals(refImplName)) &&
!(orbServerId.equals(refImplName)))
{
if (logger.isDebugEnabled())
{
logger.debug
(
"serverRequestListener: impl_name mismatch (refImplName: " +
refImplName +
" and orbServerId " +
orbServerId +
" and orbImplName " +
orbImplName
);
}
throw new org.omg.PortableServer.POAPackage.WrongAdapter();
}
// Get cached scopes from ServerRequest
scopes = request.getScopes();
for( int i = 0; i < scopes.size(); i++)
{
final String res = (scopes.get (i));
if( res.length() == 0)
{
break;
}
/* the following is a call to a method in the private
interface between the ORB and the POA. It does the
necessary synchronization between incoming,
potentially concurrent requests to activate a POA
using its adapter activator. This call will block
until the correct POA is activated and ready to
service requests. Thus, concurrent calls
originating from a single, multi-threaded client
will be serialized because the thread that accepts
incoming requests from the client process is
blocked. Concurrent calls from other destinations
are not serialized unless they involve activating
the same adapter.
*/
try
{
tmp_poa = tmp_poa._getChildPOA( res );
}
catch ( org.jacorb.poa.except.ParentIsHolding p )
{
/* if one of the POAs is in holding state, we
simply deliver the request to this
POA. It will forward the request to its
child POAs if necessary when changing back
to active For the POA to be able to forward
this request to its child POAa, we need to
supply the remaining part of the child's
POA name */
String [] rest_of_name = new String[scopes.size () - i];
for( int j = 0; j < rest_of_name.length; j++ )
{
rest_of_name[j] = scopes.get( j+i );
}
request.setRemainingPOAName(rest_of_name);
break;
}
}
if( tmp_poa == null )
{
throw new org.omg.CORBA.INTERNAL("Request POA null!");
}
/* hand over to the POA */
tmp_poa._invoke( request );
}
catch( org.omg.PortableServer.POAPackage.WrongAdapter e )
{
// unknown oid (not previously generated)
request.setSystemException( new org.omg.CORBA.OBJECT_NOT_EXIST("unknown oid") );