code: @Override
      public Object createResource(ResourceInfo refInfo) throws Exception {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "createResource", refInfo);
          try {
              BootstrapContextImpl bootstrapContext = bootstrapContextRef.getServiceWithException();
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(this, tc, "loading", adminObjectImplClassName);
              Class<?> adminObjectClass = bootstrapContext.loadClass(adminObjectImplClassName);
              ComponentMetaData cData = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
              String currentApp = null;
              ResourceAdapterMetaData metadata = bootstrapContext.getResourceAdapterMetaData();
              // cData is null when its not in an application thread
              if (cData != null && cData != metadata) {
                  currentApp = cData.getJ2EEName().getApplication();
                  applications.add(cData.getJ2EEName().getApplication());
              }
              String adapterName = bootstrapContext.getResourceAdapterName();
              if (metadata != null && metadata.isEmbedded() && cData != metadata) { // Metadata is null for SIB/WMQ. No check needed if called from activationSpec
                  String embeddedApp = metadata.getJ2EEName().getApplication();
                  Utils.checkAccessibility(name, adapterName, embeddedApp, currentApp, false);
              }
              Object adminObject = adminObjectClass.getConstructor().newInstance();
              bootstrapContext.configure(adminObject, name, properties, null, null, null);
              return adminObject;
          } catch (Exception x) {
              throw x;
          } catch (Error x) {
              throw x;
          } finally {
              if (trace && tc.isEntryEnabled())
                  Tr.exit(this, tc, "createResource");
          }
      }
docs: {@inheritDoc}