Use the com.alpha.pineapple.CoreFactory to create an instance of the core component with a custom credential provider.
First, create the core factory:
// create core factory CoreFactory coreFactory = new CoreFactory();
Then create the credential provider using the core factory:
// define default pineapple home directory File homeDirectory = new File( "c:\pineapple-home" ); // define conf directory File confDirectory = new File( homeDirectory, "conf" ); // initialize credential file File credentialsFile = new File( confDirectory, "credentials.xml" ); // create credential provider CredentialProvider provider = coreFactory.createCredentialProvider(credentialsFile);
Finally, create the core component is created using the core factory:
// create core component PineappleCore core = coreFactory.createCore( provider );
The location where the environment configuration is loaded from is determined by resolution of the runtime directories used by the core component.
The core component will:
The core component will:
Please notice: The location where the credentials is loaded from can be customized by the credentialsFile argument to the CoreFactory.createCredentialProvider(credentialsFile) factory method.