Feature | Description | Solution | | TODOs |
|---|
Integration with reference binding provider
| CORBA reference binding needs to use CORBA reference mechanism API (DynaCorbaRequest, DynaCorbaResponse classes)
|
| | Implementation
|
Primitives
| Passing variables as an arguments and retrieving return values
| Primitives are mapped as follows (Java - IDL): byte - octet short - short int - Long long - LongLong float - float double - double char - char boolean - boolean String - string
| | INOUT/OUT modifiers
|
Structures
| Passing variables as an arguments and retrieving return values | User defines CORBA structures as simple Java classes, with public fields, ie.
public class SomeStruct { public int member1; public String member2; public InnerStruct member3; }
means, that user is expecting structure with fields int, String and third field as some other structure.
| | 1. Recurrent structures are not handled, ie.
public class Recurrent { public Recurrent member; }
2. INOUT/OUT modifiers
|
Sequences
| Passing variables as an arguments and retrieving return values | User defines CORBA sequence as an array, which may be multidimentional, ie operation:
... <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="58f71cde1fcb7f9e-8747c4b5-4cbb454c-8ab69d7c-7bf8ec180299cd0476add268"><ac:plain-text-body><![CDATA[ public int[][] getSequence(); ]]></ac:plain-text-body></ac:structured-macro> ...
is equal to IDL declaration:
... typedef<long> oneDimLong; typedef<oneDimLong> twoDimLong; twoDimLong getSequence(); ... | | 1. INOUT/OUT modifiers |
References
| Retrieving and passing CORBA references as arguments, return types
| References matches to Java interfaces. Remote objects can be retrieved and dynamic implementation for its interface will be created. Dynamic implementation will allow further CORBA invocations on remote object - those references won't be managed by Apache Tuscany.
| | 1. INOUT/OUT modifiers 2. Passing references as an arguments
|
Unions
| Generated Java classes (which bases on idl files) contains discriminator.
| ?
| | Propose a solution
|
Arrays
| There should be method to distinguish them from sequences.
| a. Can be done by annotating variable declared as an argument, or as a structure member, ie.
public class SomeStruct { @CorbaArray(length=10) <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3149349b4670ae06-6864c9ef-41944e7d-9d328f14-db88aafd21400efb8fdfb661"><ac:plain-text-body><![CDATA[ public int[] array; ]]></ac:plain-text-body></ac:structured-macro> } | | Choose a solution
|
INOUT and OUT argument types
| In CORBA, operation argument value can be changed. As we know Java supports passing arguments by values only, so update on argument is not possible. Such was solved in Java by wrapping arguments in holder classes, ie:
public class IntHolder { public int value; }
This means if user wants to get his argument updated he needs to create argument in holder class, which could be tough (maybe there are low-level techniques which allows to manipulate such arguments?).
| Solution for determining if Java object was meant to be passed as an IN, INOUT or OUT argument:
a. annotation - but possibility to have argument change would be lost b. by implementing interface, ie:
public interface InOutHolder { void setValue(Object value); Object getValue(); } public interface OutHolder { void setValue(Object value); Object getValue(); } | | Choose a solution |
Exception handling
| CORBA reference binding should provide method to retrieve and populate remote exceptions. Exceptions are similar to structures. If remote operation was declared with more than one exception, then exception which occurred should be determined by CORBA id, which may be ie. IDL:com/smt/SomeException:1.0.
| Actual solution works fine for single exception operations. If operation has more than one declared exception and application exception will occur, then general RequestConfigurationException will be raised. Determination of exception type can be implemented by comparing remote exception id string to some value declared on users class hierarchy side, ie. annotation.
If remote operation has declared exception and exception was raised, but user has passed interface with no declared exception RequestConfigurationException will be thrown.
| | Choose a solution |