Hi!

Ole Husgaard wrote:
> I am currently working on a UserTransaction
> for standalone clients.
      ^^^^^^^^^^

> Service class used in server:
> public class ClientUserTransactionService
>    extends ServiceMBeanSupport

..making it a server object...

> During startService, an instance is bound.
> This makes JNP call getReference() on it
> and binds this reference.

Good so far then.

> When the client does ctx.lookup("UserTransaction"),
> the object factory is *not* called. (In fact, it
> is *never* called.)

Is the ClientUserTransactionService class available in the clients
classpath? (note that the factory is used *on the client side*)

> Instead of delivering a ClientUserTransaction
> instance to the client, JNDI returns a Reference
> with the same data as the Reference returned by
> the ClientUserTransaction.getReference() call.

Which happens if the factory cannot be found.

> I am pretty new to JNDI, so I may have
> misunderstood something.
> If anyone who knows about this can tell
> me what I am doing wrong...

My guess is that you think that the factory is used on the serverside.
This is wrong. The server only stores the reference. No code (factories
or similar) is ever executed on the server. Consider that the server
should be replacable with a LDAP server and you can easily see why this
is the case.

regards,
  Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]

Reply via email to