Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-900
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Chris Schmidt
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

String parsing error in implementations of AbstractCoherenceDirectoryStore::findConnection(String)

Created: 15/Sep/09 12:46 PM   Updated: 15/Sep/09 12:54 PM
Component/s: Compass::Needle
Affects Version/s: 2.2.0 GA
Fix Version/s: 2.3.0 beta1

Environment: Any

 Description  « Hide
When configuring with Compass XML configuration to use a Coherence Datagrid as a CacheStore location, the property compass.engine.connection is set to the value


When trying to open a connection to the cache in AbstractCoherenceDirectory::configure() the method findConnection is mean to return only the resource part of the URI like:


It is currently returning


The reason is because the code in both implementations of the findConnection method return the connection string after removing only the protocol name itself

protected String findConnection(String connection) { return connection.substring(PROTOCOL.length()); }

This should be modified to also remove the :// from the returned string in this fashion:

protected String findConnection(String connection) { return connection.substring(PROTOCOL.length() + 3 ); }

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Chris Schmidt added a comment - 15/Sep/09 12:50 PM
another possible fix would be to add the :// to the protocol constant as such:
public static final String PROTOCOL = "coherence-dg://";

public static final String PROTOCOL = "coherence://";

Shay Banon added a comment - 15/Sep/09 12:54 PM
Thanks, fixed. Opted for the second option (since I use this logic in other stores).