Interface Instanciator

All Known Implementing Classes:

public interface Instanciator

This interface controls the instanciation of Java objects on behalf of COM objects.

Pass a reference to an object which implements this interface when registering the JVM using the Jvm class.

The default instanciator implementation used by the Jvm looks like this:

  public Object instanciate(String javaClass) throws AutomationException {
    try {
      return Class.forName(javaClass).newInstance();
    } catch(Exception e) {
      throw new AutomationException(e);

It can also be used in COM accessing EJB example.

Method Summary
 java.lang.Object instanciate(java.lang.String javaClass)
          Instanciates a Java object.

Method Detail


java.lang.Object instanciate(java.lang.String javaClass)
                             throws AutomationException
Instanciates a Java object. Called by the Jintegra runtime when a COM object wishes to create an instance of a new Java object. You are free to do anything you wish in this method, such as return references to existing Java objects.

javaClass - The name of the Java class to be instanciated
return value. A reference to the instanciated object
AutomationException - If any other exception occurs.