The Object Management Group was formed in order to promote
development in what kind of environments?
- Heterogeneous systems.
- Single-vendor systems.
- Embedded systems.
- Web-based systems.
- Wireless systems.
The Object Management Group is responsible for
- The publication of standards.
- The implementation of standards.
- The marketing and selling of CORBA technologies.
- The standardization of object-oriented languages.
- The standardization of object management methods.
The long-term vision of the Object Management Group is
- The realization of a true commercial off-the-shelf software component marketplace.
- The development of standards-based technologies to replace COM/DCOM.
- The development of standards-based technologies to replace RMI.
- The realization of standards for object-oriented languages.
- The implementation of true machine intelligence.
The OMA Object Model describes an object as an encapsulated
entity whose services can only be accessed (pick the one that
forms part of the OMA Object Model):
- Via well-defined interfaces.
- When the object is executing.
- By a local process.
- By another object.
- By a client with the appropriate permissions.
You are a software engineering in the B2B industry and write an
interface for purchase-order submission that can be used by
anyone in your industry. Under the OMA Reference Model your
interface would be considered a
- Domain interface.
- Application interface.
- Common Facility.
- Object Service.
- Dynamic interface.
You implement a new way for an object to dynamically query for
the interface of a given object reference. Under the OMA
Reference Model your interface would be considered a
- Domain interface.
- Application interface.
- Common Facility.
- Object Service.
- Dynamic interface.
The CORBA Dynamic Invocation Interface is used for
- Finding out which interface and methods a CORBA object implements and invoking them.
- Allocation and de-allocation of memory for programming languages that do not have garbage collection.
- Invoking interfaces that are able to change themselves at runtime.
- Runtime determination of ORB status.
- Speedy invocation of methods whose objects happen to reside on the local machine.
Say someone emails you a stringified CORBA object which you know
nothing about, which of the following is something you can
not do with it?
- Invoke methods on it using the Dynamic invocation interface.
- Turn it into a
CORBA.Object
.
- Find out which machine hosts the object by using a helper program.
- Find out which interfaces the object implements by using a helper program.
- Parse it and separate it into the host, protocol, and interfaces parts.
In CORBA the stub and skeleton:
- Are generated from the IDL file.
- Have a reverse meaning than stub an skeleton for Java RMI.
- Must run on the same machine.
- Share the same ORB instance.
- Interface directly with the communications infrastructure.
The ORB handles the communication infrastructure, the stub and skeleton talk to the ORB.
In CORBA, marshaling means:
- Turning data types into a standardized format that can be sent over a stream.
- Arbitrating the order in which the calls to a remote CORBA object are handled.
- Turning a CORBA object into a string using the
object_to_string
function call.
- Compressing the information to be sent over a serial line so as to minimize the bandwidth needed.
- Determining the runtime size of a CORBA object.
The CORBA Object Adapter is responsible for many things. Which
one of the following tasks is not one of the
responsibilities of the CORBA Object Adapter?
- Object marshaling
- Object registration
- Object reference generation
- Server process activation
- Object activation
Why was the development of an Interface Definition Language
required for CORBA?
- Because CORBA is language-independent.
- Because the OMG wanted a to limit the functionality of CORBA interfaces.
- Because CORBA objects can be called remotely.
- Because the CORBA Naming Service needed it.
- It was not required. It was added as a way to simplify CORBA object development.
In IDL, an attribute
represents a
- Data member
- Function argument
- Class
- One of
in
, out
, or inout
- There is no such thing.
In IDL, an attribute
maps into (that is, when
running the IDL compiler)
- A get and a set method
- A data member
- A function
- A class
- An exception
Which one of the following is a primitive data type that is not supported by IDL.
- int
- long
- short
- boolean
- char
In IDL, the any
type represents
- Any IDL type.
- Any type the programming language supports.
- Any of the types implemented by that
module
- Any of a selected number of types (which are given as arguments to this type definition).
- The
Any
class.
The Any
class is just a mapping for a particular language (C++).
The IDL statement
sequence<string<5>,10>
defines a new
type which holds:
- A sequence of 10 strings each with a maximum length of 5 characters.
- 10 sequences of 5 strings each.
- 5 strings in a sequence whose maximum length is 10.
- It does not define a new type.
- A sequence that starts out with 10 strings, each of length 5. The length of the sequence could change later.
In the IDL function definition string foo(out Employee
e);
, the out
parameter implies that:
- When I make a call to this function the argument's value will be thrown away.
- When this function returns the argument's value will be garbage.
- The argument should be deleted as soon as the function returns.
- The argument cannot be deleted after the function returns.
- The argument is of a non-IDL type.
Which one of the following IDL snippets is incorrect?
i.e., which will not be compiled by an idl compiler?
-
module M {
interface A {
string f(in float x, in B b);
};
interface B {
string g(in float y);
};
}
module M {
exception ExceptionA {
string message;
}
interface A {
string f() raises (ExceptionA);
};
}
module M {
typedef sequence<string> ss;
interface A{
ss foo();
}
}
module M {
interface A{
attribute string x;
string foo();
};
}
module M {
interface A {
unsigned long foo(inout string x);
};
interface B : A {
unsigned long bar(inout string x);
};
}
The interface is used before its declared.
Given the following interface
module M{
interface Factory {
string foo(in string x);
};
interface Boo{
string bar(inout Boo b);
};
}
When a client calls bar
on a CORBA object that
implements the Boo
interface, what happens?
- The client sends a reference to a CORBA object as argument.
- The client sends the CORBA object as argument.
- The client sends a marshaled CORBA object as argument.
- The client does not send a CORBA object as argument. It lets the remote ORB get a reference by itself.
- The ORB ignores the argument when the client invokes this function.
An IDL module
maps to C++
- namespace
- package
- class
- abstract class
- header file
Which of the following assertions about a CORBA object reference
is not true.
- It is in reality a stub.
- Its created when the object is created.
- It always refers to the same object.
- It is immutable.
- It is opaque.
Stubs and object references are different entities in CORBA.
Which one of the following is something a CORBA ORB can
not hide from the client of a CORBA object?
- The interfaces that the object implements.
- The location of the object.
- The programming language the object is implemented with.
- Whether the object is running or not at the time.
- The type of communication method (TCP/IP, pipes, etc.) used to contact the object.
What is IIOP?
- Its the protocol that ORBs should use for talking to each other.
- Its an ORB implementation that is machine-independent.
- Its the Integrated Internet Object Protocol.
- Its the implementation of the IDL language.
- Its the next version of CORBA.
When you compile your interface file with idlj
for
Java, the interface member functions end up declared in
which file (assume your interface is named Hello and your module
HelloMod).
- HelloOperations.java
- HelloMod.java
- _HelloMod.java
- _HelloImpl.java
- Hello.java
By examining the _InterfacenameStub.java file generated by
idlj
we can determine
- That all method invocations are turned into dynamic invocations.
- The communications infrastructure used by this CORBA object.
- The number of instances of this object that exist.
- That the skeleton has a direct connection with the stub.
- That
idlj
generates a lot of code which is never executed.
In CORBA the narrow
function is responsible for
- Casting CORBA object references to their appropriate type.
- Reducing the functionality of a CORBA object.
- Eliminating interfaces from the list of supported interfaces of a CORBA object.
- Finding the object that implements a given interface.
- Implementing the Dynamic Invocation Interface.
The resolve_initial_references
function in CORBA returns
- A CORBA object
- The name of the Naming Service
- The machine on which the Naming Service runs
- Nothing.
- A result code.
Which are the two implementation models for a Java CORBA server?
- Inheritance and delegation.
- Extension and immersion.
- Inheritance and implementation.
- Adapter and Factory.
- Factory and delegation.
You can make a stringified reference of a CORBA object with the call
- object_to_string
- stringify
- serialize
- toString
- println
What does RMI-IIOP allow you to do?
- Have RMI server be accessed by a CORBA client.
- Automatically transform the source code for an RMI object into code for a CORBA object.
- Translate between IIOP and the RMI protocol.
- Garbage collect CORBA objects.
- Implement IDL interfaces with RMI.
What does rmic -idl
do?
- Generates an IDL interface that matches a given Java interface.
- Generates Java code that supports IIOP.
- Uses a given IDL file as the interface for an RMI object.
- Gives an error.
- Verifies that a given Java RMI interface matches a given IDL interface.
What does the CORBA Interface Repository (IR) service provide?
- Runtime access to the registered (with the IR) interfaces.
- Runtime access to all interfaces created in the system.
- A mapping between interfaces and objects.
- A mapping between modules and interfaces.
- An alternative to the Naming Service.
Which one of the following actions is not a step that a
CORBA server must take when it runs in order to serve a
CORBA object:
- Register the object with the root naming service.
- Create and initialize the ORB.
- Initialize/activate the Object Adapter.
- Create an instance of the class that implements the interface we want to serve.
- Register the instance of the class that implements the interface with the ORB.
You implemented a CORBA interface which is now used by millions
all over the world. Your object server uses a factory to serve
instance of your object. After living the good life off your
royalties for two years, you decide that its time to improve
your implementation. You want to add new functions to your
interface but without having to force your client who do not
want to use the new functions to re-compile their programs. Can
you do that? How? Also, assume that none of them want to use
dynamic invocation.
- Yes, by creating a new interface which inherits from the old one and adding the functions to that new interface. The factory can then serve this new interface.
- Yes, by adding the functions to the interface but without changing the name of the interface.
- Yes, by creating a new interface that has the functions. The factory can then serve this new interface.
- Yes, by changing the factory so that it returns an invalid object, forcing the clients to ask for a new one and then giving them the new interface.
- No
An IDL sequence
is mapped to a C++
- class
- array
- map
- Vector
- vector
Which one of the following is a feature that RMI has but CORBA
lacks?
- Automatic code downloading.
- Location transparency.
- Object state transparency.
- Dynamic invocation.
- A naming service.
You can get dynamic invocation in Java (or, something
close to it) by using reflection (which is really
should be called "introspection").
Which one of the following is a feature that CORBA has but RMI
lacks?
- Language independence.
- Automatic code downloading.
- Location transparency.
- Object state transparency.
- A naming service.
The CORBA naming service is more powerful than the RMI naming service because
- It lets one organize names into contexts.
- It is faster.
- It is implemented as a remote object (unlike the rmiregistry).
- It is not. They are both about the same.
- It does garbage collection of unused names.
Which one of the following is a difference between the code
generated by idlj
and the code generated by MICO's
idl
?
idlj
generates two interface files, MICO just one.
- One of them generates only the stub.
idlj
generates a narrow
method while MICO inherits it from the library.
- One of them generates an empty implementation class (i.e., the one you need to implement to provide the remote object's functionality).
- One of them handles IDL exceptions.