title: Understanding the @ConnectionDefinitions annotation in jca 1.6
body: <p>I cannot find an example that shows a use case for using the plural @ConnectionDefinitions on a ManagedConnectionFactory implementation.  What confuses me is that the singular @ConnectionDefinition annotation does not let you provide @ConfigProperty for each definition.  You can only use @ConfigProperty to set the default properties for ALL instances of the ManagedConnectionFactory, and every connection definition must use a different ConnectionFactory interface.  So assuming you did something like this:</p>
  
  <pre><code>@ConnectionDefinitions(value = { 
      @ConnectionDefinition(
              connection = com.company.product.connector.MyConnection.class, 
              connectionFactory = com.company.product.connector.ConnectionFactory1.class, 
              connectionFactoryImpl = com.company.product.connector.ConnectionFactory1Impl.class, 
              connectionImpl = com.company.product.connector.MyConnectionImpl.class
      )
  
      @ConnectionDefinition(
              connection = com.company.product.connector.MyConnection.class, 
              connectionFactory = com.company.product.connector.ConnectionFactory2.class, 
              connectionFactoryImpl = com.company.product.connector.ConnectionFactory2Impl.class, 
              connectionImpl = com.company.product.connector.MyConnectionImpl.class
      )
  })
  public class MyManagedConnectionFactory implements
      ManagedConnectionFactory, ResourceAdapterAssociation {
  
  @Override
  public Object createConnectionFactory(ConnectionManager connectionManager)
          throws ResourceException {
          //Return the connection factory.
      }
  }
  </code></pre>
  
  <p>How will createConnectionFactory() know whether or not to return ConnectionFactory1 or ConnectionFactory2?  Unless someone overrides the annotation anyways through ra.xml, I see no way to use a config-property as a conditional.</p>
  
  <p>It seems difficult to determine which connection definition a ManagedConnectionFactory is a part of, so why do this when you can just have seperate ManagedConnectionFactory for every ConnectionFactory?</p>
  
  <p>An example would be very helpful.</p>