I have just attached a patch jar (dol.jar) for 3.1.2. You could copy this jar to your $GF_INSTALL/modules, to replace the dol.jar as part of your installation.
When I tried to provide patch jar in the past for 3.1.2, I was told the version I have does not exactly match their versions, so the safer way to do this would be:
1. extract the dol.jar patch I attached to the issue.
2. use the extracted com/sun/enterprise/deployment/ConnectorDescriptor.class to update the dol.jar in your GlassFish installation (this class is the only class that's changed to fix the issue).