How can I invoke methods which are not specified on the IDL interface ? [Corba, JAVA]

133 views Asked by At

My IDL looks like :

interface TransactionResource {
    void prepare() raises (NotPreparedException);
    void commit() raises(TransactionException);
    void rollback() raises(TransactionException);
};

When i implement the TransactionResourceImpl, I implement an other Java interface "ManageDemand" like this:

public class TransactionResourceImpl extends TransactionResourcePOA implements ManageDemand {
    // In this class, I redefine TransactionResource methods, and ManageDemand methods.
}

When I send this object TransactionResourceImpl to client, he can just use the TransactionResource methods and not ManageDemand methods.

I tried to use the reflexion to invoke ManageDemand methods, but it's not possible.

How can the client invoke ManageDemand methods, on the TransactionResourceImpl distributed reference?

1

There are 1 answers

0
Brian Kelly On

It is not possible. You'll have to add those methods to the IDL and implement them as you would any other CORBA object.