Skip to content

Commit

Permalink
[JENKINS-50001] Do not attempt to serialize a ConnectionPoolDataSourc…
Browse files Browse the repository at this point in the history
…e to hudson.scm.IntegritySCM.xml.
  • Loading branch information
jglick committed Mar 7, 2018
1 parent 9909eba commit ce39c29
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/hudson/scm/IntegritySCM.java
Expand Up @@ -899,24 +899,29 @@ public static final class DescriptorImpl extends SCMDescriptor<IntegritySCM>
{
@Extension
public static final DescriptorImpl INTEGRITY_DESCRIPTOR = new DescriptorImpl();
private ConnectionPoolDataSource dataSource;
private transient ConnectionPoolDataSource connectionPoolDataSource;
private List<IntegrityConfigurable> configurations;

public DescriptorImpl()
{
super(IntegritySCM.class, IntegrityWebUI.class);
configurations = new ArrayList<IntegrityConfigurable>();
load();
}

@Override
public void load() {
super.load();

// Initialize our derby environment
System.setProperty(DerbyUtils.DERBY_SYS_HOME_PROPERTY,
Jenkins.getInstance().getRootDir().getAbsolutePath());
DerbyUtils.loadDerbyDriver();
LOGGER.info("Creating Integrity SCM cache db connection...");
dataSource = DerbyUtils
connectionPoolDataSource = DerbyUtils
.createConnectionPoolDataSource(Jenkins.getInstance().getRootDir().getAbsolutePath());
LOGGER.info("Creating Integrity SCM cache registry...");
DerbyUtils.createRegistry(dataSource);
DerbyUtils.createRegistry(connectionPoolDataSource);

// Log the construction...
LOGGER.fine("IntegritySCM DescriptorImpl() constructed!");
Expand Down Expand Up @@ -977,7 +982,7 @@ public boolean isApplicable(@SuppressWarnings("rawtypes") Job project)
*/
public ConnectionPoolDataSource getDataSource()
{
return dataSource;
return connectionPoolDataSource;
}

/**
Expand Down

0 comments on commit ce39c29

Please sign in to comment.