@ Override public Object createResource ( ResourceInfo info ) throws Exception { ComponentMetaData cData = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . getComponentMetaData ( ) ; if ( cData != null ) applications . add ( cData . getJ2EEName ( ) . getApplication ( ) ) ; return cloudantSvc . createResource ( ( String ) props . get ( "databaseName" ) , ( Boolean ) props . get ( "create" ) , info == null ? ResourceInfo . AUTH_APPLICATION : info . getAuth ( ) , info == null ? null : info . getLoginPropertyList ( ) ) ; }
Invoked when a cloudant Database is injected or looked up .