You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-user@db.apache.org by Craig L Russell <Cr...@Sun.COM> on 2008/12/12 19:19:41 UTC

Re: Strange problem: timeout first time, then ok

Hi,

This is probably the wrong forum for this issue. You might try the  
datanucleus forum at http://www.jpox.org/servlet/forum/index

Regards,

Craig

On Dec 9, 2008, at 12:11 PM, jamh wrote:

>
> Hello,
>
> I am running into something quite odd, and wanted to see if anyone  
> could
> shed light on this.  I have defined two persistence beans as:
>
> <spring:bean id="certPersistFactory" scope="singleton"
> class 
> ="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
>          <spring:property name="jdoProperties">
>            <spring:props>
>                <spring:prop
> key 
> = 
> "javax 
> .jdo 
> .PersistenceManagerFactoryClass 
> ">org.jpox.jdo.JDOPersistenceManagerFactory
> </spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionURL">jdbc:sqlserver:// 
> 1.2.3.4:1433;DatabaseName=dbcert;SelectMethod=cursor</spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionUserName">user1</spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionPassword">passwd1</spring:prop>
>                <spring:prop
> key 
> = 
> "javax 
> .jdo 
> .option 
> .ConnectionDriverName">com.microsoft.sqlserver.jdbc.SQLServerDriver
> </spring:prop>
>                <spring:prop
> key="javax.jdo.option.NontransactionalWrite">true</spring:prop>
>                <spring:prop
> key="org.jpox.identifier.case">PreserveCase</spring:prop>
>                <spring:prop
> key="org.jpox.fixedDatastore">true</spring:prop>
>                <spring:prop
> key="org.jpox.validateTables">false</spring:prop>
>            </spring:props>
>          </spring:property>
>        </spring:bean>
>
> <spring:bean id="prodPersistFactory" scope="singleton"
> class 
> ="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
>          <spring:property name="jdoProperties">
>            <spring:props>
>                <spring:prop
> key 
> = 
> "javax 
> .jdo 
> .PersistenceManagerFactoryClass 
> ">org.jpox.jdo.JDOPersistenceManagerFactory
> </spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionURL">jdbc:sqlserver:// 
> 1.2.3.4:9546;DatabaseName=dbcert;SelectMethod=cursor</spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionUserName">user2</spring:prop>
>                <spring:prop
> key="javax.jdo.option.ConnectionPassword">passwd2</spring:prop>
>                <spring:prop
> key 
> = 
> "javax 
> .jdo 
> .option 
> .ConnectionDriverName">com.microsoft.sqlserver.jdbc.SQLServerDriver
> </spring:prop>
>                <spring:prop
> key="javax.jdo.option.NontransactionalWrite">true</spring:prop>
>                <spring:prop
> key="org.jpox.identifier.case">PreserveCase</spring:prop>
>                <spring:prop
> key="org.jpox.fixedDatastore">true</spring:prop>
>                <spring:prop
> key="org.jpox.validateTables">false</spring:prop>
>            </spring:props>
>          </spring:property>
>        </spring:bean>
>
> So the first strange thing is that if I reverse their order, ie. if  
> I have
> the prod bean precede the cert bean, the app won't start, ie. it  
> gives me a
> socket error.
>
> The second strange thing is that with the above, all operations to  
> the cert
> bean work flawlessly, but operations to the prod bean give me a  
> timeout the
> first time, but then after that, they work ever after.
>
> If I restart the app, again the first operation on the prod bean  
> times out,
> and after that it works.
>
> PS: if I have two beans that both run on the same port but different  
> hosts,
> everything works fine.  The two databases are set up identically.
>
> What is going on?
> Any help is appreciated.
> -- 
> View this message in context: http://www.nabble.com/Strange-problem%3A-timeout-first-time%2C-then-ok-tp20922247p20922247.html
> Sent from the JDO - Development mailing list archive at Nabble.com.
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: Strange problem: timeout first time, then ok

Posted by jamh <ja...@bccampus.ca>.
Thank you, issue is solved.  SQLserver's mirroring was responsible for the
behavior.


Craig L Russell wrote:
> 
> Hi,
> 
> This is probably the wrong forum for this issue. You might try the  
> datanucleus forum at http://www.jpox.org/servlet/forum/index
> 
> Regards,
> 
> Craig
> 
> On Dec 9, 2008, at 12:11 PM, jamh wrote:
> 
>>
>> Hello,
>>
>> I am running into something quite odd, and wanted to see if anyone  
>> could
>> shed light on this.  I have defined two persistence beans as:
>>
>> <spring:bean id="certPersistFactory" scope="singleton"
>> class 
>> ="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
>>          <spring:property name="jdoProperties">
>>            <spring:props>
>>                <spring:prop
>> key 
>> = 
>> "javax 
>> .jdo 
>> .PersistenceManagerFactoryClass 
>> ">org.jpox.jdo.JDOPersistenceManagerFactory
>> </spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionURL">jdbc:sqlserver:// 
>> 1.2.3.4:1433;DatabaseName=dbcert;SelectMethod=cursor</spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionUserName">user1</spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionPassword">passwd1</spring:prop>
>>                <spring:prop
>> key 
>> = 
>> "javax 
>> .jdo 
>> .option 
>> .ConnectionDriverName">com.microsoft.sqlserver.jdbc.SQLServerDriver
>> </spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.NontransactionalWrite">true</spring:prop>
>>                <spring:prop
>> key="org.jpox.identifier.case">PreserveCase</spring:prop>
>>                <spring:prop
>> key="org.jpox.fixedDatastore">true</spring:prop>
>>                <spring:prop
>> key="org.jpox.validateTables">false</spring:prop>
>>            </spring:props>
>>          </spring:property>
>>        </spring:bean>
>>
>> <spring:bean id="prodPersistFactory" scope="singleton"
>> class 
>> ="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
>>          <spring:property name="jdoProperties">
>>            <spring:props>
>>                <spring:prop
>> key 
>> = 
>> "javax 
>> .jdo 
>> .PersistenceManagerFactoryClass 
>> ">org.jpox.jdo.JDOPersistenceManagerFactory
>> </spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionURL">jdbc:sqlserver:// 
>> 1.2.3.4:9546;DatabaseName=dbcert;SelectMethod=cursor</spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionUserName">user2</spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.ConnectionPassword">passwd2</spring:prop>
>>                <spring:prop
>> key 
>> = 
>> "javax 
>> .jdo 
>> .option 
>> .ConnectionDriverName">com.microsoft.sqlserver.jdbc.SQLServerDriver
>> </spring:prop>
>>                <spring:prop
>> key="javax.jdo.option.NontransactionalWrite">true</spring:prop>
>>                <spring:prop
>> key="org.jpox.identifier.case">PreserveCase</spring:prop>
>>                <spring:prop
>> key="org.jpox.fixedDatastore">true</spring:prop>
>>                <spring:prop
>> key="org.jpox.validateTables">false</spring:prop>
>>            </spring:props>
>>          </spring:property>
>>        </spring:bean>
>>
>> So the first strange thing is that if I reverse their order, ie. if  
>> I have
>> the prod bean precede the cert bean, the app won't start, ie. it  
>> gives me a
>> socket error.
>>
>> The second strange thing is that with the above, all operations to  
>> the cert
>> bean work flawlessly, but operations to the prod bean give me a  
>> timeout the
>> first time, but then after that, they work ever after.
>>
>> If I restart the app, again the first operation on the prod bean  
>> times out,
>> and after that it works.
>>
>> PS: if I have two beans that both run on the same port but different  
>> hosts,
>> everything works fine.  The two databases are set up identically.
>>
>> What is going on?
>> Any help is appreciated.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Strange-problem%3A-timeout-first-time%2C-then-ok-tp20922247p20922247.html
>> Sent from the JDO - Development mailing list archive at Nabble.com.
>>
> 
> Craig L Russell
> Architect, Sun Java Enterprise System http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-Strange-problem%3A-timeout-first-time%2C-then-ok-tp20980900p20983445.html
Sent from the JDO - User mailing list archive at Nabble.com.