[jcifs] Re: Jarapac Stubs not Compatible with DEC/RPC Calling Conventions

Eric Glass eric.glass at gmail.com
Tue Jul 13 09:30:52 GMT 2004

> I don't think Jarapac can use stubs like this:
>    public interface ExampleInterface extends Remote {
>        public long testOperation(int arg1, String arg2) throws
> RemoteException;
>    }
> We need to support pointers to primative types. Consider:
>    int NetServerEnumAll([in] wchar_t *server_unc,
>        [in,out] int *level,
>        [in,out,switch_is(level)] NetShareCtr *ctr,
>        [in] unsigned long max_buffer,
>        [out] unsigned long *totalentries,
>        [in,out] unsigned long *resume_handle);
> Mike

My original plan for handling this sort of thing was through the
Pointer subclasses (to represent pointers) and Holder classes (to box
primitives).  The general idea was to represent a boxed primitive
something like:

    Element boxed = new UnsignedLongHolder();

and a pointer to that primitive like:

    Pointer p = new FullPointer(boxed);

The interface would just represent this as an UnsignedLongHolder:

    public void foo(UnsignedLongHolder arg1) throws RemoteException;

The pointer wrapping would be done within the generated client stub,
so all the caller would need to do is create the holder:

    UnsignedLongHolder arg1 = new UnsignedLongHolder(5);

That was the idea, anyways; RPC pointers were a bit fuzzy to me, so
I'm not sure if this approach is feasible or not.


More information about the jcifs mailing list