ws-kandula-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruben DF <rdocas...@yahoo.es>
Subject about RegistrationService
Date Tue, 20 Jun 2006 20:07:34 GMT
Hi,

I have some doubts about Kandula. Well, I have a
client with the following code:

wstm.begin();
  serviceX.method();
wstm.commit();

Well, the serviceX is an Axis service. Firstable,
wstm.begin() obtains a transactional context, doesn't
obtain?. Afterwards, the client calls to method() from
serviceX. TxHandler notices that the message SOAP
contains a transactional context (ctx) and since it
has not a Transaction asociated, calls to
Mediator(tx,ctx) to register the context with the
participant. The code is:

	protected void register(boolean durable,
CoordinationContext ctx)
			throws RemoteException {
		long timeout = 0;
		Expires ex = ctx.getExpires();
		if (ex != null)
			timeout = ex.get_value().longValue();
		epr =
CoordinationService.getInstance().getParticipantService(this,
			timeout);
		eprOfCoordinator = ctx.register(
			durable ? ATCoordinator.PROTOCOL_ID_DURABLE_2PC
					: ATCoordinator.PROTOCOL_ID_VOLATILE_2PC, epr);
	}

My first question is...epr is referred to the client
or to the serviceX?.How does Kandula knows that my
participant is the service X and not the client? why
serviceX doesnt call to kandula's method Register() in
order that kandula registers serviceX as a
participant?

The second question is...what are the diferences
between register method from AbstractParticipant (see
code above) and register method from TransactionImpl?
Below is the code from TransactionImpl

	private void register() throws RemoteException {
		long timeout = 0;
		Expires ex = ctx.getExpires();
		if (ex != null)
			timeout = ex.get_value().longValue();
		callback = new CompletionInitiatorCallback();
		
		EndpointReference epr =
CoordinationService.getInstance().getCompletionInitiatorService(
			callback, timeout);
		callback.setEndpointReference(epr);
		eprOfCompletionCoordinator = ctx.register(
			ATCoordinator.PROTOCOL_ID_COMPLETION, epr);
		canInitiateCompletion = true;
	}

the third question...if I comment the line
wstm.commit() of the client code...why dont I see the
message soap (in tcpmonitor) asociated to the
registrationService? (I only see the
activationCoordiantor)It is supposed that the
wstm.commit() doesn't generate the registration of the
ctx but the called to serviceX.method(), doesn't it?

Thanks in advance


		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Mime
View raw message