com.sun.enterprise.config.serverbeans
Interface Resources

All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy, org.jvnet.hk2.component.Injectable

public interface Resources
extends org.jvnet.hk2.config.ConfigBeanProxy, org.jvnet.hk2.component.Injectable

J2EE Applications look up resources registered with the Application server, using portable JNDI names.


Nested Class Summary
static class Resources.Duck
           
 
Method Summary
<T> Resource
getResourceByName(Class<T> type, String name)
           
 List<Resource> getResources()
          Gets the value of the customResourceOrExternalJndiResourceOrJdbcResourceOrMailResourceOrAdminObjectResourceOrConnectorResourceOrResourceAdapterConfigOrJdbcConnectionPoolOrConnectorConnectionPool property.
<T> Collection<T>
getResources(Class<T> type)
           
 Collection<BindableResource> getResourcesOfPool(String connectionPoolName)
           
 
Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParent
 
Methods inherited from interface org.jvnet.hk2.component.Injectable
injectedInto
 

Method Detail

getResources

List<Resource> getResources()
Gets the value of the customResourceOrExternalJndiResourceOrJdbcResourceOrMailResourceOrAdminObjectResourceOrConnectorResourceOrResourceAdapterConfigOrJdbcConnectionPoolOrConnectorConnectionPool property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the customResourceOrExternalJndiResourceOrJdbcResourceOrMailResourceOrAdminObjectResourceOrConnectorResourceOrResourceAdapterConfigOrJdbcConnectionPoolOrConnectorConnectionPool property.

For example, to add a new item, do as follows:

    getCustomResourceOrExternalJndiResourceOrJdbcResourceOrMailResourceOrAdminObjectResourceOrConnectorResourceOrResourceAdapterConfigOrJdbcConnectionPoolOrConnectorConnectionPool().add(newItem);
 

Objects of the following type(s) are allowed in the list CustomResource ExternalJndiResource JdbcResourceMailResource AdminObjectResource ConnectorResource ResourceAdapterConfig JdbcConnectionPool ConnectorConnectionPool


getResources

@DuckTyped
<T> Collection<T> getResources(Class<T> type)

getResourceByName

@DuckTyped
<T> Resource getResourceByName(Class<T> type,
                                         String name)

getResourcesOfPool

@DuckTyped
Collection<BindableResource> getResourcesOfPool(String connectionPoolName)


Copyright © 2012 GlassFish Community. All Rights Reserved.