Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry and retry.delay - Where should it be set ? #455

Closed
jfgosselin opened this issue Nov 29, 2013 · 5 comments
Closed

retry and retry.delay - Where should it be set ? #455

jfgosselin opened this issue Nov 29, 2013 · 5 comments
Assignees
Milestone

Comments

@jfgosselin
Copy link

Doing some tests and it seems that the property "retry" is read from the persistence-unit but
the property "retry.delay" is read from the kundera.client.property file. 

E.g. If move <property name="retry" value="true" /> in kundera_client_properties.xml, it's ignored.

<persistence-unit name="testing_cassandra_storage_pu">
    <provider>com.impetus.kundera.KunderaPersistence</provider>
    <properties>
        <property name="kundera.dialect" value="cassandra" />
        <property name="kundera.keyspace" value="testing" />
        <property name="retry" value="true" />
        <property name="kundera.client.property" value="kundera_client_properties.xml" />
    </properties>
</persistence-unit> 

Thanks

JF

@jfgosselin
Copy link
Author

Not an issue, but any reasons why these params need to be set in different places (retry in persistence-unit and retry.delay in the kundera.client.property file) ?

Thanks

@mevivs
Copy link
Collaborator

mevivs commented Dec 3, 2013

Any such properties in persistence.xml should be ignored. Client specific property is right place for it.

-Vivek

@jfgosselin
Copy link
Author

CassandraHostConfiguration

protected void buildHosts(String hosts, String portAsString, List<Host> hostsList)
{
.
.


        setConfig(cassandraHost, persistenceUnitMetadata.getProperties(), externalProperties);
.



@Override
protected void setConfig(Host host, Properties props, Map puProperties)
{ 
.
.
.
 hostRetry = Boolean.parseBoolean(props.getProperty(Constants.RETRY) != null ? props.getProperty(
                Constants.RETRY).trim() : null);

So it's a bug, if you look at CassandraHostConfiguration, Constants.RETRY is read from the persistence.xml

It should be setConfig(cassandraHost, externalProperties, persistenceUnitMetadata.getProperties()); instead ?

@mevivs
Copy link
Collaborator

mevivs commented Dec 10, 2013

Sounds like a Bug. Yes, let me verify and fix this in 2.9

-Vivek

@ghost ghost assigned mevivs Dec 10, 2013
mevivs added a commit that referenced this issue Dec 11, 2013
@mevivs
Copy link
Collaborator

mevivs commented Dec 12, 2013

Fixed in current trunk. Please verify.

-Vivek

@mevivs mevivs closed this as completed Dec 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants