Oracle9i Business Components for Java InterMedia API Reference
Oracle9i JDeveloper (9.0.4)
B10394-01

oracle.ord.im
Class NotConnectedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--oracle.jbo.JboException
                          |
                          +--oracle.ord.im.OrdJboException
                                |
                                +--oracle.ord.im.NotConnectedException
All Implemented Interfaces:
oracle.jbo.common.JboMessage, oracle.jbo.common.MetaObjectBase, java.io.Serializable

public class NotConnectedException
extends OrdJboException

Signals the method requires a JDBC connection to the database but the interMedia domain object is not yet connected to the database.

Many of the methods of the interMedia domain classes require a database connection. For example: deleteContent and loadDataFromFile both require a connection.

While the domain object instantiated by the Business Components for Java (BC4J) framework to represent the interMedia database object has a database connection, the domain object created by the Java program does not have one. Users should first set a database connection into non-BC4J created domain objects before invoking methods requiring a connection.

To get a connection for the newly created domain object, the user needs to call the postChanges method.

        OrdImageDomain imgDomain = new OrdImageDomain();
        Row row = vo.createRow();
        row.setAttribute("Image", imgDomain);
        viewObject.insertRow(row);
        appModule.getTransaction().postChanges();
        // From this point on, the imgDomain object gets the connection

Note the postChanges posts the row into the database, then the row gets selected back, finally the image object gets selected back with the JDBC connection.

Since:
JDev5.0
See Also:
Serialized Form

Field Summary

 

Fields inherited from interface oracle.jbo.common.MetaObjectBase
TYP_APP_MODULE, TYP_ATTRIBUTE, TYP_ATTRIBUTE_LIST_WITH_DEF, TYP_COMPONENT_OBJECT, TYP_DEF_ANY, TYP_DEF_APP_MODULE, TYP_DEF_ATTRIBUTE, TYP_DEF_COMPONENT_OBJECT, TYP_DEF_DOMAIN, TYP_DEF_ENTITY_ASSOC, TYP_DEF_ENTITY_OBJECT, TYP_DEF_PACKAGE, TYP_DEF_VIEW_LINK, TYP_DEF_VIEW_OBJECT, TYP_DOMAIN, TYP_ENTITY_ASSOC, TYP_ENTITY_OBJECT, TYP_ENTITY_ROW, TYP_ENTITY_ROW_SET, TYP_ENTITY_ROW_SET_ITERATOR, TYP_ENTITY_USAGE, TYP_PACKAGE, TYP_VALIDATOR_TYPE, TYP_VIEW_LINK, TYP_VIEW_OBJECT, TYP_VIEW_ROW, TYP_VIEW_ROW_SET, TYP_VIEW_ROW_SET_ITERATOR

 

Constructor Summary
NotConnectedException(java.lang.String methodName, java.lang.String className)
          Constructs a NotConnectedException instance.

 

Methods inherited from class oracle.ord.im.OrdJboException
getProductCode, getResourceName

 

Methods inherited from class oracle.jbo.JboException
addToDetails, addToExceptions, doEntityToVOMapping, getBaseMessage, getDetailMessage, getDetails, getErrorCode, getErrorParameters, getExceptions, getLocalizedBaseMessage, getLocalizedMessage, getMessage, getResourceClass, getSource, getTypeNameFromId, hasPeerExceptions, isAppendCodes, isLocalizable, needsEntityToVOMapping, printStackTrace, printStackTrace, printStackTrace, setAppendCodes, setApplicationModule, setDetails, setExceptions, setNeedsEntityToVOMapping, setSource

 

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

NotConnectedException

public NotConnectedException(java.lang.String methodName,
                             java.lang.String className)
Constructs a NotConnectedException instance.
Parameters:
methodName - the name of the method requiring the database connection
className - the class name of the domain object

Oracle9i Business Components for Java InterMedia API Reference
Oracle9i JDeveloper (9.0.4)
B10394-01

Copyright © 2001,2003, Oracle. All Rights Reserved.