commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juozas Baliuka <bali...@mwm.lt>
Subject Re: [AltRMI] New Direct-Marshalled transport type
Date Sun, 27 Jan 2002 10:37:43 GMT
<skip>
>>But I don't know how  to handle  "By Value".
>>void myMethod( MyInterfaceType mt ){
>>     mt.setSomething("X");//Don't understand how to handle this (  is X 
>> set on copy of Object  ? )
>>    }
>
>X will be a copy of the object if pass by value or over the wire.  I'm not 
>quite sure what your asking here.

Yes, communication is my problem :(
I try to see framework or API as user .
I see two problems in "transparence". Distributed and Persistent objects 
have problem with
"Fatal Errors" like "Connection is lost" and "By Value" then users code 
tries to set something on copy of object.
Transparent objects doe's not implement any "Tag Interface" and doe's not 
throw checked Exceptions
specific for way they are marshaled.
//////////////////////////////////////////////////////////////////////////
Problem 1 :
users code ("Fatal Errors specific for framework implementation" )

  void myMethodUsesTransparentObject(  Transparent transparent ){
       try{
         transaction.begin();
         transparent.doSometing();//throws some App Exception
         transparent.setSomething();
         .........................................
         transaction.commit();

     }catch(SomeCheckedAppException sce){
           log(sce);
       transaction.rollback();
     }
     // I forgot to handle "Connection is lost " and compiler says nothing.
     // My transaction is incomplete and it is very possible I have a 
"Lock" forever on some resource.
    // It can be impossible to find this bug for user. We need solution, I 
don't have it.

  }

//////////////////////////////////////////////////////////////////////////

Problem 2 :

User calls my transparent objects he don't know marshaling stuff, 
implements "callbacks" sets "Context" ... .
He knows :
virtual void my_cpp_method( transparent object )=0;// "By Value"
irtual void my_cpp_method1( transparent & object )=0;// "By Reference"
procedure MyPascalProcedure(  var  aObject : TTransparent  ) virtual 
abstract; (* "Always By Reference " *)
public void myJAVAMethod(Transparent transparent);// sometimes "By value" ? 
Transparent has no "Tag" interface
User knows usual stuff, and "Transparence" must become usual.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Very possible to train users, write books, documentation, I don't know is 
it solution or not.
I have no solution for this two problems.
It is because I trying to think as user, I must think about my team it is 
my job.
I like transparence, but I think it can kill users project if will not 
solve my problems.












<skip>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message