Sending a Heartbeat

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Sending a Heartbeat

stacyann_1
Sorry for the newbie question, but just wondering how to go about this.  Before I start receiving ExecutionReport messages, I need to send a message of form Heartbeat (35=0). My main uses initiator:
  SessionSettings settings = new SessionSettings("c:\\quickfix\\settings.cfg");
            LOGGER.log(Level.WARNING, settings.getDefaultProperties().toString() );
            MessageStoreFactory storeFactory = new FileStoreFactory( settings);
            MessageFactory messageFactory = new DefaultMessageFactory();
            Initiator initiator = new SocketInitiator
              (listener, storeFactory, settings, messageFactory);
            initiator.start();

Should I put the send of the Heartbeat message in "onCreate" in my class that implements Application?

Thanks,
Stacy
Reply | Threaded
Open this post in threaded view
|

Re: Sending a Heartbeat

toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Stacy,

I may be mistaken, but I think all  heartbeat exchange happens behind
the scenes automatically.

Once you log on to your FIX acceptor and they exchange login messages,
each side sends heartbeats to each other automatically.

if that's not enough for yo, you can try sending a heartbeat in the
onLogon() method in your FIX Application subclass as well.

for example, when our Marketcetera OMS connects to the FIX exchange
simulator (essentially the ordermatcher in the quickfixj examples
directory), the simulator sends a heartbeat to OMS after logon, and
the OMS replies. and it's the underlying QFJ layer that handles all of
that, we didn't have to add any code to setup heartbeat exchange,
aside from having the default
HeartBtInt=30 value setup in the config file (ours is done in Spring
but it's the same idea):
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/main/resources/quickfixj.xml

hope this helps.

On 4/23/07, stacyann_1 <[hidden email]> wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
> Sorry for the newbie question, but just wondering how to go about this.
> Before I start receiving ExecutionReport messages, I need to send a message
> of form Heartbeat (35=0). My main uses initiator:
>   SessionSettings settings = new
> SessionSettings("c:\\quickfix\\settings.cfg");
>             LOGGER.log(Level.WARNING,
> settings.getDefaultProperties().toString() );
>             MessageStoreFactory storeFactory = new FileStoreFactory(
> settings);
>             MessageFactory messageFactory = new DefaultMessageFactory();
>             Initiator initiator = new SocketInitiator
>               (listener, storeFactory, settings, messageFactory);
>             initiator.start();
>
> Should I put the send of the Heartbeat message in "onCreate" in my class
> that implements Application?
>
> Thanks,
> Stacy
> --
> View this message in context: http://www.nabble.com/Sending-a-Heartbeat-tf3635037.html#a10150311
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Sending a Heartbeat

stacyann_1
In reply to this post by stacyann_1
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Thanks Toli,
I think you might be correct. The message that the Source is expecting
on connection is:
1:16:13.653RX8=FIX.4.4|9=79|35=0|34=2|49=AAAA|52=20080420-15:16:13.652|5
6=BBB|1
12=L.0001.0002.0003.151613|10=120|

All this information should be available from the setting file.  Is
there a way that I can up quickfix logging so that I can see if it sends
this message?

Thanks,
Stacy
----------------------------------------------------------------------

Message: 1
Date: Tue, 24 Apr 2007 00:18:06 -0700
From: "Toli Kuznets" <[hidden email]>
Subject: Re: [Quickfixj-users] Sending a Heartbeat
To: [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Stacy,

I may be mistaken, but I think all  heartbeat exchange happens behind
the scenes automatically.

Once you log on to your FIX acceptor and they exchange login messages,
each side sends heartbeats to each other automatically.

if that's not enough for yo, you can try sending a heartbeat in the
onLogon() method in your FIX Application subclass as well.

for example, when our Marketcetera OMS connects to the FIX exchange
simulator (essentially the ordermatcher in the quickfixj examples
directory), the simulator sends a heartbeat to OMS after logon, and the
OMS replies. and it's the underlying QFJ layer that handles all of that,
we didn't have to add any code to setup heartbeat exchange, aside from
having the default HeartBtInt=30 value setup in the config file (ours is
done in Spring but it's the same idea):
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/ma
in/resources/quickfixj.xml

hope this helps.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Sending a Heartbeat

toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Stacy,

We've switched our QFJ config to use Spring, so i haven't been using
the .cfg files in a while.
Here's a reference from when we used it before in the Marketcetera OMS:
http://trac.marketcetera.org/trac.fcgi/browser/platform/tags/0.1.4/oms/src/main/resources/oms.properties#L49

Those vars are used for ScreenLogFactory so you'll need to make sure
you are creating one of those in your code. There are similar ones for
SLF4J as well, and other loggers as well.

Essentially, you need this:
ScreenLogShowHeartBeats=Y
or SLF4JLogHeartbeats=Y for SLF4J


On 4/25/07, Marcassoli, Stacy <[hidden email]> wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Thanks Toli,
> I think you might be correct. The message that the Source is expecting
> on connection is:
> 1:16:13.653RX8=FIX.4.4|9=79|35=0|34=2|49=AAAA|52=20080420-15:16:13.652|5
> 6=BBB|1
> 12=L.0001.0002.0003.151613|10=120|
>
> All this information should be available from the setting file.  Is
> there a way that I can up quickfix logging so that I can see if it sends
> this message?
>
> Thanks,


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

newbie questions

Robert Brueckmann-2
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
1.)  We plan on connecting to 4 end-points, so I have 4 sessions in my
configuration file...is there a benefit to using the
ThreadedSocketInitiator as opposed to just the SocketInitiator?

2.)  If one of our end-point's connection goes down indefinitely, are
the remaining 3 sessions ok?  Say one of the 4 end-points goes down
momentarily and then goes back up, will the engine reconnect or do I
have to bring the entire engine down and reconnect all 4 sessions?

3.)  Examples of the custom Initiator classes have a 'System.in'
statement waiting for a user to hit a key on the keyboard to exit the
engine.  If we want to put this process in the background, this isn't a
feasible design obviously...so I was curious what people are doing to
build an engine that can be set as a background process and then when
brought back to the foreground, how is the engine being stopped
elegantly so the appropriate logout and disconnect procedures occur?

Thanks for any help and your patience with a newcomer!

rob

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

jdbc logging

Robert Brueckmann-2
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
I have another question regarding jdbc logging.  We use an oracle
database.  My dba set up all of the tables based on the sample SQL
scripts for the mysql database.  When I fire up the engine which is
configured with one session, I get the following log output to the
console:

-------

beginning initiator...
2007-04-26 10:19:06,478 DEBUG [main] proxool.ShutdownHook
(ShutdownHook.java:73) - Registered shutdownHook
2007-04-26 10:19:06,509 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:84) - Registering 'quickfixj-1' house keeper
2007-04-26 10:19:06,509 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:92) - Starting a house keeper thread
2007-04-26 10:19:06,697 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: isReadOnly()
= false
2007-04-26 10:19:06,712 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getHoldability() = 1
2007-04-26 10:19:06,728 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getTransactionIsolation() = 2
2007-04-26 10:19:06,743 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getTypeMap()
= {SYS.XMLTYPE=class oracle.xdb.XMLTypeFactory}
2007-04-26 10:19:06,743 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getCatalog()
= null
2007-04-26 10:19:06,743 INFO  [main] proxool.ConnectionPool
(ConnectionPool.java:623) - Proxool statistics legend: "s - r  (a/t/o)"
> s=served, r=refused (only shown if non-zero), a=active, t=total,
o=offline (being tested)
2007-04-26 10:19:06,743 DEBUG [main] proxool.Prototyper
(Prototyper.java:204) - 000000 (01/01/00) - Connection #1 created on
demand = ACTIVE
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.ClientDataSupport
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleConnection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleConnection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Connection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.ClobDBAccess
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.BlobDBAccess
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.sql.BfileDBAccess
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Statement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OraclePreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
java.sql.PreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OraclePreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleStatement
quickfix.ConfigError: error during session initialization
        at
quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractS
ocketInitiator.java:132)
        at
quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketIni
tiator.java:73)
        at
quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketIni
tiator.java:65)
        at
quickfix.ThreadedSocketInitiator.<init>(ThreadedSocketInitiator.java:32)
        at
com.merlin.pb.fix.MerlinFIXInitiator.main(MerlinFIXInitiator.java:111)
Caused by: java.lang.RuntimeException: java.sql.SQLException: ORA-01400:
cannot insert NULL into ("FIX"."SESSIONS"."SESSION_QUALIFIER")

        at quickfix.JdbcStoreFactory.create(JdbcStoreFactory.java:44)
        at quickfix.Session.<init>(Session.java:270)
        at
quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:152)
        at
quickfix.mina.SessionConnector.createSession(SessionConnector.java:112)
        at
quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractS
ocketInitiator.java:126)
        ... 4 more
Caused by: java.sql.SQLException: ORA-01400: cannot insert NULL into
("FIX"."SESSIONS"."SESSION_QUALIFIER")

        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:12
5)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
        at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.jav
a:182)
        at
oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStat
ement.java:630)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:1081)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrepare
dStatement.java:2905)
        at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStateme
nt.java:2996)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100
)
        at
org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:
57)
        at
$java.sql.Statement$$EnhancerByProxool$$a742985f.execute(<generated>)
        at quickfix.JdbcStore.loadCache(JdbcStore.java:130)
        at quickfix.JdbcStore.<init>(JdbcStore.java:65)
        at quickfix.JdbcStoreFactory.create(JdbcStoreFactory.java:42)
        ... 8 more
2007-04-26 10:19:08,993 DEBUG [ShutdownHook] proxool.ShutdownHook
(ShutdownHook.java:93) - Running ShutdownHook
2007-04-26 10:19:08,993 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:490) - Shutting down 'quickfixj-1' pool immediately
[Shutdown Hook]
2007-04-26 10:19:09,009 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:447) - 000001 (00/00/00) - #0001 removed because of
shutdown.
2007-04-26 10:19:09,009 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:553) - Connection #1 closed
2007-04-26 10:19:09,009 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:570) - 'quickfixj-1' pool has been closed down by
Shutdown Hook in 16 milliseconds.
2007-04-26 10:19:09,009 INFO  [Shutdown Hook]
proxool.PrototyperController (PrototyperController.java:100) - Stopping
Prototyper thread
2007-04-26 10:19:09,009 INFO  [Shutdown Hook]
proxool.HouseKeeperController (HouseKeeperController.java:107) -
Stopping HouseKeeper thread

-----

Why is it trying to insert NULL initially in a column specifically set
to NOT NULL?  Is this JDBC logging just not compatible with an oracle
back-end?  We're using the latest oracle jdbc drivers and the latest
release of the quickfix/j engine...any thoughts?

Thanks,
Rob

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

toli
In reply to this post by Robert Brueckmann-2
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Robert,

> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions in my
> configuration file...is there a benefit to using the
> ThreadedSocketInitiator as opposed to just the SocketInitiator?

This is a classic trade-off. if you need all your incoming messages to
be processed in order they are coming in across all connections, then
use the regular SocketInitiator.
If the 4 connections are totally unrelated then you can process them
concurrently using the ThreadedSocketInitiator

>
> 2.)  If one of our end-point's connection goes down indefinitely, are
> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
> momentarily and then goes back up, will the engine reconnect or do I
> have to bring the entire engine down and reconnect all 4 sessions?

QFJ should reconnect to the lost connection when it comes back u and
renegotiate a logon.
there area various timeout settings you can tweak to modify the
timeout behaviour.

> 3.)  Examples of the custom Initiator classes have a 'System.in'
> statement waiting for a user to hit a key on the keyboard to exit the
> engine.  If we want to put this process in the background, this isn't a
> feasible design obviously...so I was curious what people are doing to
> build an engine that can be set as a background process and then when
> brought back to the foreground, how is the engine being stopped
> elegantly so the appropriate logout and disconnect procedures occur?
>

I'd be intersted to hear how others approach this problem as well. For
now, we create the socket initiator and FIX listenrers in Spring, and
then the main thread just goes to sleep (we do a new
Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if you
run it on the console, or with an /etc/init.d script wrapping a 'kill
-9' on our virtual appliance. Here's the code for reference:
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Stephen Bate
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
> I'd be intersted to hear how others approach this problem as well. For
> now, we create the socket initiator and FIX listenrers in Spring, and
> then the main thread just goes to sleep (we do a new
> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if you
> run it on the console, or with an /etc/init.d script wrapping a 'kill
> -9' on our virtual appliance. Here's the code for reference:

Another way to do this is to create a simple custom JMX MBean that
shutdowns the connectors (acceptors and initiators)and other
resources and then exits the process. You could use any JMX-enabled
tool to stop the process that way (including Java command line
programs).



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Tommy Hannon-5
In reply to this post by toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
I just started developing with QuickFIX/J last week and am totally  
delighted with the ease of use (kinda of like switching to a Mac).

Most everything you need to manage the "grunt-work" of the protocol  
is handled using the "Setting" file as described in the user manual.  
Session level stuff, Logon/Logout, heartbeats, resends, all are  
handled "under-the-hood" and need not be handled at your application  
level code.  IMHO, the greatest benefit to new users is the  
management extensions.

Just add a few lines of code to a Java 1.5 codebase and a system  
property on the command line; start "jconsole" and connect! (Be sure  
to start the console using the same user as your application if  
running locally)  From there the session attributes page is a real  
help. you can view or update values on-the-fly.  Go to the  
"Operations" tab and you can reset, disconnect, logon, or logoff  
individual sessions.

In general this product is very is easy to use, almost beyond  
belief.  My suggestion would be to check out the "Creating Your  
Application", "Receiving Messages" and "Sending Messages" sections of  
the user manual paying attention to the "Most Type Safe" approach.

Good luck!

-Tommy

On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Robert,
>
>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions  
>> in my
>> configuration file...is there a benefit to using the
>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>
> This is a classic trade-off. if you need all your incoming messages to
> be processed in order they are coming in across all connections, then
> use the regular SocketInitiator.
> If the 4 connections are totally unrelated then you can process them
> concurrently using the ThreadedSocketInitiator
>
>>
>> 2.)  If one of our end-point's connection goes down indefinitely, are
>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>> momentarily and then goes back up, will the engine reconnect or do I
>> have to bring the entire engine down and reconnect all 4 sessions?
>
> QFJ should reconnect to the lost connection when it comes back u and
> renegotiate a logon.
> there area various timeout settings you can tweak to modify the
> timeout behaviour.
>
>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>> statement waiting for a user to hit a key on the keyboard to exit the
>> engine.  If we want to put this process in the background, this  
>> isn't a
>> feasible design obviously...so I was curious what people are doing to
>> build an engine that can be set as a background process and then when
>> brought back to the foreground, how is the engine being stopped
>> elegantly so the appropriate logout and disconnect procedures occur?
>>
>
> I'd be intersted to hear how others approach this problem as well. For
> now, we create the socket initiator and FIX listenrers in Spring, and
> then the main thread just goes to sleep (we do a new
> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if you
> run it on the console, or with an /etc/init.d script wrapping a 'kill
> -9' on our virtual appliance. Here's the code for reference:
> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/ 
> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>
>
> --
> Toli Kuznets
> http://www.marketcetera.com: Open-Source Trading Platform
> download.run.trade.
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Tommy Hannon-5
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
BTW, another approach to question #3...

Use RMI to expose methods to an external process.  From there, you  
can write a simple application that can call these methods  
(performing whatever tasks you need).  I guess another alternative  
would be to call the hooks in the management extensions if you only  
need those methods that have already bee exposed.

You should also register a shutdown thread.  This will get called  
when the Ctrl-C interrupt is passed to the JVM.  You can gracefully  
close DB connections, files. etc. before you program is terminated.

-Tommy

On Apr 26, 2007, at 11:54 AM, Tommy Hannon wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> I just started developing with QuickFIX/J last week and am totally
> delighted with the ease of use (kinda of like switching to a Mac).
>
> Most everything you need to manage the "grunt-work" of the protocol
> is handled using the "Setting" file as described in the user manual.
> Session level stuff, Logon/Logout, heartbeats, resends, all are
> handled "under-the-hood" and need not be handled at your application
> level code.  IMHO, the greatest benefit to new users is the
> management extensions.
>
> Just add a few lines of code to a Java 1.5 codebase and a system
> property on the command line; start "jconsole" and connect! (Be sure
> to start the console using the same user as your application if
> running locally)  From there the session attributes page is a real
> help. you can view or update values on-the-fly.  Go to the
> "Operations" tab and you can reset, disconnect, logon, or logoff
> individual sessions.
>
> In general this product is very is easy to use, almost beyond
> belief.  My suggestion would be to check out the "Creating Your
> Application", "Receiving Messages" and "Sending Messages" sections of
> the user manual paying attention to the "Most Type Safe" approach.
>
> Good luck!
>
> -Tommy
>
> On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:
>
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>> Robert,
>>
>>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions
>>> in my
>>> configuration file...is there a benefit to using the
>>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>>
>> This is a classic trade-off. if you need all your incoming  
>> messages to
>> be processed in order they are coming in across all connections, then
>> use the regular SocketInitiator.
>> If the 4 connections are totally unrelated then you can process them
>> concurrently using the ThreadedSocketInitiator
>>
>>>
>>> 2.)  If one of our end-point's connection goes down indefinitely,  
>>> are
>>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>>> momentarily and then goes back up, will the engine reconnect or do I
>>> have to bring the entire engine down and reconnect all 4 sessions?
>>
>> QFJ should reconnect to the lost connection when it comes back u and
>> renegotiate a logon.
>> there area various timeout settings you can tweak to modify the
>> timeout behaviour.
>>
>>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>>> statement waiting for a user to hit a key on the keyboard to exit  
>>> the
>>> engine.  If we want to put this process in the background, this
>>> isn't a
>>> feasible design obviously...so I was curious what people are  
>>> doing to
>>> build an engine that can be set as a background process and then  
>>> when
>>> brought back to the foreground, how is the engine being stopped
>>> elegantly so the appropriate logout and disconnect procedures occur?
>>>
>>
>> I'd be intersted to hear how others approach this problem as well.  
>> For
>> now, we create the socket initiator and FIX listenrers in Spring, and
>> then the main thread just goes to sleep (we do a new
>> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if  
>> you
>> run it on the console, or with an /etc/init.d script wrapping a 'kill
>> -9' on our virtual appliance. Here's the code for reference:
>> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/
>> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>>
>>
>> --
>> Toli Kuznets
>> http://www.marketcetera.com: Open-Source Trading Platform
>> download.run.trade.
>>
>> ---------------------------------------------------------------------
>> -
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Robert Brueckmann-2
In reply to this post by Tommy Hannon-5
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Awesome.  Thanks guys for all your help!  The JMX and jconsole
suggestions were perfect and exactly what I was looking for.  Much
appreciated!

Thanks,

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: jdbc logging

Brad Harvey
In reply to this post by Robert Brueckmann-2
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/

Hi Rob,

My guess is that it is because Oracle treats the empty string as NULL.
Try setting a session qualifier in your configuration to see if that
helps.  

Regards,
Brad.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Robert Brueckmann
Sent: Friday, 27 April 2007 12:24 AM
To: [hidden email]
Subject: [Quickfixj-users] jdbc logging

QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/ I have another
question regarding jdbc logging.  We use an oracle database.  My dba set
up all of the tables based on the sample SQL scripts for the mysql
database.  When I fire up the engine which is configured with one
session, I get the following log output to the
console:

-------

beginning initiator...
2007-04-26 10:19:06,478 DEBUG [main] proxool.ShutdownHook
(ShutdownHook.java:73) - Registered shutdownHook
2007-04-26 10:19:06,509 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:84) - Registering 'quickfixj-1' house keeper
2007-04-26 10:19:06,509 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:92) - Starting a house keeper thread
2007-04-26 10:19:06,697 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: isReadOnly()
= false
2007-04-26 10:19:06,712 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getHoldability() = 1
2007-04-26 10:19:06,728 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getTransactionIsolation() = 2
2007-04-26 10:19:06,743 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getTypeMap()
= {SYS.XMLTYPE=class oracle.xdb.XMLTypeFactory}
2007-04-26 10:19:06,743 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getCatalog()
= null
2007-04-26 10:19:06,743 INFO  [main] proxool.ConnectionPool
(ConnectionPool.java:623) - Proxool statistics legend: "s - r  (a/t/o)"
> s=served, r=refused (only shown if non-zero), a=active, t=total,
o=offline (being tested)
2007-04-26 10:19:06,743 DEBUG [main] proxool.Prototyper
(Prototyper.java:204) - 000000 (01/01/00) - Connection #1 created on
demand = ACTIVE
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.ClientDataSupport
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleConnection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleConnection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Connection
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.ClobDBAccess
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.BlobDBAccess
2007-04-26 10:19:06,993 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.sql.BfileDBAccess
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Statement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OraclePreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
java.sql.PreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OraclePreparedStatement
2007-04-26 10:19:08,243 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleStatement
quickfix.ConfigError: error during session initialization
        at
quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractS
ocketInitiator.java:132)
        at
quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketIni
tiator.java:73)
        at
quickfix.mina.initiator.AbstractSocketInitiator.<init>(AbstractSocketIni
tiator.java:65)
        at
quickfix.ThreadedSocketInitiator.<init>(ThreadedSocketInitiator.java:32)
        at
com.merlin.pb.fix.MerlinFIXInitiator.main(MerlinFIXInitiator.java:111)
Caused by: java.lang.RuntimeException: java.sql.SQLException: ORA-01400:
cannot insert NULL into ("FIX"."SESSIONS"."SESSION_QUALIFIER")

        at quickfix.JdbcStoreFactory.create(JdbcStoreFactory.java:44)
        at quickfix.Session.<init>(Session.java:270)
        at
quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:152)
        at
quickfix.mina.SessionConnector.createSession(SessionConnector.java:112)
        at
quickfix.mina.initiator.AbstractSocketInitiator.createSessions(AbstractS
ocketInitiator.java:126)
        ... 4 more
Caused by: java.sql.SQLException: ORA-01400: cannot insert NULL into
("FIX"."SESSIONS"."SESSION_QUALIFIER")

        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:12
5)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
        at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.jav
a:182)
        at
oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStat
ement.java:630)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:1081)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrepare
dStatement.java:2905)
        at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStateme
nt.java:2996)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100
)
        at
org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:
57)
        at
$java.sql.Statement$$EnhancerByProxool$$a742985f.execute(<generated>)
        at quickfix.JdbcStore.loadCache(JdbcStore.java:130)
        at quickfix.JdbcStore.<init>(JdbcStore.java:65)
        at quickfix.JdbcStoreFactory.create(JdbcStoreFactory.java:42)
        ... 8 more
2007-04-26 10:19:08,993 DEBUG [ShutdownHook] proxool.ShutdownHook
(ShutdownHook.java:93) - Running ShutdownHook
2007-04-26 10:19:08,993 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:490) - Shutting down 'quickfixj-1' pool immediately
[Shutdown Hook]
2007-04-26 10:19:09,009 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:447) - 000001 (00/00/00) - #0001 removed because of
shutdown.
2007-04-26 10:19:09,009 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:553) - Connection #1 closed
2007-04-26 10:19:09,009 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:570) - 'quickfixj-1' pool has been closed down by
Shutdown Hook in 16 milliseconds.
2007-04-26 10:19:09,009 INFO  [Shutdown Hook]
proxool.PrototyperController (PrototyperController.java:100) - Stopping
Prototyper thread
2007-04-26 10:19:09,009 INFO  [Shutdown Hook]
proxool.HouseKeeperController (HouseKeeperController.java:107) -
Stopping HouseKeeper thread

-----

Why is it trying to insert NULL initially in a column specifically set
to NOT NULL?  Is this JDBC logging just not compatible with an oracle
back-end?  We're using the latest oracle jdbc drivers and the latest
release of the quickfix/j engine...any thoughts?

Thanks,
Rob

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker
Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global
Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from
one of its affiliates, that may be confidential and privileged. If you
are not an intended recipient, please refrain from any disclosure,
copying, distribution or use of this information and note that such
actions are prohibited. If you have received this transmission in error,
please notify the sender immediately by telephone or by replying to this
transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered
through Merlin Securities, LLC are not insured by the FDIC or any other
Federal Government Agency, are not deposits of or guaranteed by Merlin
Securities, LLC and may lose value. Nothing in this communication shall
constitute a solicitation or recommendation to buy or sell a particular
security.



------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express Download DB2 Express C -
the FREE version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: jdbc logging

Stephen Bate
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
> My guess is that it is because Oracle treats the empty string as NULL.
> Try setting a session qualifier in your configuration to see if that
> helps.

Brad is correct. You'll need to remove the NOT NULL constraint
on the session qualifier column since the value defaults to an
empty string and Oracle will treat this as a NULL.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Joerg Thoennes
In reply to this post by Tommy Hannon-5
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
On 04/26/07 19:05, Tommy Hannon wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> BTW, another approach to question #3...
>
> Use RMI to expose methods to an external process.  From there, you  
> can write a simple application that can call these methods  
> (performing whatever tasks you need).  I guess another alternative  
> would be to call the hooks in the management extensions if you only  
> need those methods that have already bee exposed.
>
> You should also register a shutdown thread.  This will get called  
> when the Ctrl-C interrupt is passed to the JVM.  You can gracefully  
> close DB connections, files. etc. before you program is terminated.

         Thread shutdownHook = new Thread( "Gateway.shutdownHook" ) {
             public void run() {
                 shutdown( "Terminated by runtime system" );
             }
         };
         Runtime.getRuntime().addShutdownHook( shutdownHook );

Then in the shutdown() method you can do something like this:

        acceptor.stop();

Cheers, Jörg

> On Apr 26, 2007, at 11:54 AM, Tommy Hannon wrote:
>
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>> I just started developing with QuickFIX/J last week and am totally
>> delighted with the ease of use (kinda of like switching to a Mac).
>>
>> Most everything you need to manage the "grunt-work" of the protocol
>> is handled using the "Setting" file as described in the user manual.
>> Session level stuff, Logon/Logout, heartbeats, resends, all are
>> handled "under-the-hood" and need not be handled at your application
>> level code.  IMHO, the greatest benefit to new users is the
>> management extensions.
>>
>> Just add a few lines of code to a Java 1.5 codebase and a system
>> property on the command line; start "jconsole" and connect! (Be sure
>> to start the console using the same user as your application if
>> running locally)  From there the session attributes page is a real
>> help. you can view or update values on-the-fly.  Go to the
>> "Operations" tab and you can reset, disconnect, logon, or logoff
>> individual sessions.
>>
>> In general this product is very is easy to use, almost beyond
>> belief.  My suggestion would be to check out the "Creating Your
>> Application", "Receiving Messages" and "Sending Messages" sections of
>> the user manual paying attention to the "Most Type Safe" approach.
>>
>> Good luck!
>>
>> -Tommy
>>
>> On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:
>>
>>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>>> QuickFIX/J Support: http://www.quickfixj.org/support/
>>> Robert,
>>>
>>>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions
>>>> in my
>>>> configuration file...is there a benefit to using the
>>>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>>> This is a classic trade-off. if you need all your incoming  
>>> messages to
>>> be processed in order they are coming in across all connections, then
>>> use the regular SocketInitiator.
>>> If the 4 connections are totally unrelated then you can process them
>>> concurrently using the ThreadedSocketInitiator
>>>
>>>> 2.)  If one of our end-point's connection goes down indefinitely,  
>>>> are
>>>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>>>> momentarily and then goes back up, will the engine reconnect or do I
>>>> have to bring the entire engine down and reconnect all 4 sessions?
>>> QFJ should reconnect to the lost connection when it comes back u and
>>> renegotiate a logon.
>>> there area various timeout settings you can tweak to modify the
>>> timeout behaviour.
>>>
>>>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>>>> statement waiting for a user to hit a key on the keyboard to exit  
>>>> the
>>>> engine.  If we want to put this process in the background, this
>>>> isn't a
>>>> feasible design obviously...so I was curious what people are  
>>>> doing to
>>>> build an engine that can be set as a background process and then  
>>>> when
>>>> brought back to the foreground, how is the engine being stopped
>>>> elegantly so the appropriate logout and disconnect procedures occur?
>>>>
>>> I'd be intersted to hear how others approach this problem as well.  
>>> For
>>> now, we create the socket initiator and FIX listenrers in Spring, and
>>> then the main thread just goes to sleep (we do a new
>>> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if  
>>> you
>>> run it on the console, or with an /etc/init.d script wrapping a 'kill
>>> -9' on our virtual appliance. Here's the code for reference:
>>> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/
>>> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>>>
>>>
>>> --
>>> Toli Kuznets
>>> http://www.marketcetera.com: Open-Source Trading Platform
>>> download.run.trade.
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> ---
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Quickfixj-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>>
>>
>> ----------------------------------------------------------------------
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


--
Joerg Thoennes
http://www.macd.com                 Tel.: +49 (0)241 44597-24
Macdonald Associates GmbH           Geschäftsführer: Roger Macdonald
Lothringer Str. 52, D-52070 Aachen  Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Joerg Thoennes
In reply to this post by toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
On 04/26/07 17:46, Toli Kuznets wrote:

>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>> statement waiting for a user to hit a key on the keyboard to exit the
>> engine.  If we want to put this process in the background, this isn't a
>> feasible design obviously...so I was curious what people are doing to
>> build an engine that can be set as a background process and then when
>> brought back to the foreground, how is the engine being stopped
>> elegantly so the appropriate logout and disconnect procedures occur?
>
> I'd be intersted to hear how others approach this problem as well. For
> now, we create the socket initiator and FIX listenrers in Spring, and
> then the main thread just goes to sleep (we do a new
> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if you
> run it on the console, or with an /etc/init.d script wrapping a 'kill
> -9' on our virtual appliance. Here's the code for reference:
> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59

On UNIX, you can send your process into background by a double-fork:

You start a background process

        starter &

and this starter process starts your application into the background:

        starter:

        application </dev/null >logfile 2>&1 &
        echo $! >application.pid
        exit

Now this process is a real daemon, ie child of the init process with PID 1.
In addition, it is not tight to a terminal by redirecting stdin ("<"), stdout (">") and
stderr ( "2>" ).

You can also consider to put this in your own process group if you enable the monitor mode in the bash:

        set -m

Then every background process started with "&" is put into his own process group. The PID of the
initial process is then the process group id. To kill all processes in this group:

        kill -$PID

(i.e. the negative value)

Using the saved "application.pid" you can stop this process using

        kill $(< application.pid) # bash
        kill `cat application.pid` # bourne shell

This signal is then catched by the shutdown handler (copy from previous posting):

          Thread shutdownHook = new Thread( "Gateway.shutdownHook" ) {
              public void run() {
                  shutdown( "Terminated by runtime system" );
              }
          };
          Runtime.getRuntime().addShutdownHook( shutdownHook );

Then in the shutdown() method you can do something like this:

        acceptor.stop();

Hope this helps!

I have no idea how to do this using Windows since I simply do not use it for anything.

Cheers, Jörg


--
Joerg Thoennes
http://www.macd.com                 Tel.: +49 (0)241 44597-24
Macdonald Associates GmbH           Geschäftsführer: Roger Macdonald
Lothringer Str. 52, D-52070 Aachen  Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Alex McGlashan
In reply to this post by Tommy Hannon-5
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Hi Tommy,

I was interested to read your note below about updating session
attributes on the fly.  Does this include new SenderCompID values?
Could you describe the process for starting the console and connecting
in a bit more detail?

Thanks in advance,
Alex


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Tommy Hannon
Sent: 26 April 2007 17:54
To: [hidden email]
Subject: Re: [Quickfixj-users] newbie questions

QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
I just started developing with QuickFIX/J last week and am totally  
delighted with the ease of use (kinda of like switching to a Mac).

Most everything you need to manage the "grunt-work" of the protocol  
is handled using the "Setting" file as described in the user manual.  
Session level stuff, Logon/Logout, heartbeats, resends, all are  
handled "under-the-hood" and need not be handled at your application  
level code.  IMHO, the greatest benefit to new users is the  
management extensions.

Just add a few lines of code to a Java 1.5 codebase and a system  
property on the command line; start "jconsole" and connect! (Be sure  
to start the console using the same user as your application if  
running locally)  From there the session attributes page is a real  
help. you can view or update values on-the-fly.  Go to the  
"Operations" tab and you can reset, disconnect, logon, or logoff  
individual sessions.

In general this product is very is easy to use, almost beyond  
belief.  My suggestion would be to check out the "Creating Your  
Application", "Receiving Messages" and "Sending Messages" sections of  
the user manual paying attention to the "Most Type Safe" approach.

Good luck!

-Tommy

On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Robert,
>
>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions  
>> in my
>> configuration file...is there a benefit to using the
>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>
> This is a classic trade-off. if you need all your incoming messages to
> be processed in order they are coming in across all connections, then
> use the regular SocketInitiator.
> If the 4 connections are totally unrelated then you can process them
> concurrently using the ThreadedSocketInitiator
>
>>
>> 2.)  If one of our end-point's connection goes down indefinitely, are
>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>> momentarily and then goes back up, will the engine reconnect or do I
>> have to bring the entire engine down and reconnect all 4 sessions?
>
> QFJ should reconnect to the lost connection when it comes back u and
> renegotiate a logon.
> there area various timeout settings you can tweak to modify the
> timeout behaviour.
>
>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>> statement waiting for a user to hit a key on the keyboard to exit the
>> engine.  If we want to put this process in the background, this  
>> isn't a
>> feasible design obviously...so I was curious what people are doing to
>> build an engine that can be set as a background process and then when
>> brought back to the foreground, how is the engine being stopped
>> elegantly so the appropriate logout and disconnect procedures occur?
>>
>
> I'd be intersted to hear how others approach this problem as well. For
> now, we create the socket initiator and FIX listenrers in Spring, and
> then the main thread just goes to sleep (we do a new
> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if you
> run it on the console, or with an /etc/init.d script wrapping a 'kill
> -9' on our virtual appliance. Here's the code for reference:
> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/ 
> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>
>
> --
> Toli Kuznets
> http://www.marketcetera.com: Open-Source Trading Platform
> download.run.trade.
>
> ----------------------------------------------------------------------

> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail.

Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited.  If you receive this transmission in error, please notify us immediately, and then delete this E-mail.

Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments.

Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

Tommy Hannon-5
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Alex,

The SenderCompID is a listed attribute and appears editable, but I  
have not attempted to change this as it is assigned in the "Settings"  
file and we have no need to change it on the fly.

Regarding management... make sure you have made necessary code  
changes depending on your version of Java as described in the user  
manual.  The "jconsole" application is in the java installation "bin"  
subdirectory.  Just run it (you do not need any parameters).  It  
would probably be best if you run it on the same machine as your FIX  
application under the same user.  The process ID will be listed and  
all you have to do is select it and click "connect".  You can also  
run it remotely, but you will probably need to open firewall ports.

I hope that helps.

-Tommy

On Apr 27, 2007, at 5:12 AM, Alex McGlashan wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Hi Tommy,
>
> I was interested to read your note below about updating session
> attributes on the fly.  Does this include new SenderCompID values?
> Could you describe the process for starting the console and connecting
> in a bit more detail?
>
> Thanks in advance,
> Alex
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Tommy Hannon
> Sent: 26 April 2007 17:54
> To: [hidden email]
> Subject: Re: [Quickfixj-users] newbie questions
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> I just started developing with QuickFIX/J last week and am totally
> delighted with the ease of use (kinda of like switching to a Mac).
>
> Most everything you need to manage the "grunt-work" of the protocol
> is handled using the "Setting" file as described in the user manual.
> Session level stuff, Logon/Logout, heartbeats, resends, all are
> handled "under-the-hood" and need not be handled at your application
> level code.  IMHO, the greatest benefit to new users is the
> management extensions.
>
> Just add a few lines of code to a Java 1.5 codebase and a system
> property on the command line; start "jconsole" and connect! (Be sure
> to start the console using the same user as your application if
> running locally)  From there the session attributes page is a real
> help. you can view or update values on-the-fly.  Go to the
> "Operations" tab and you can reset, disconnect, logon, or logoff
> individual sessions.
>
> In general this product is very is easy to use, almost beyond
> belief.  My suggestion would be to check out the "Creating Your
> Application", "Receiving Messages" and "Sending Messages" sections of
> the user manual paying attention to the "Most Type Safe" approach.
>
> Good luck!
>
> -Tommy
>
> On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:
>
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>> Robert,
>>
>>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions
>>> in my
>>> configuration file...is there a benefit to using the
>>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>>
>> This is a classic trade-off. if you need all your incoming  
>> messages to
>> be processed in order they are coming in across all connections, then
>> use the regular SocketInitiator.
>> If the 4 connections are totally unrelated then you can process them
>> concurrently using the ThreadedSocketInitiator
>>
>>>
>>> 2.)  If one of our end-point's connection goes down indefinitely,  
>>> are
>>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>>> momentarily and then goes back up, will the engine reconnect or do I
>>> have to bring the entire engine down and reconnect all 4 sessions?
>>
>> QFJ should reconnect to the lost connection when it comes back u and
>> renegotiate a logon.
>> there area various timeout settings you can tweak to modify the
>> timeout behaviour.
>>
>>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>>> statement waiting for a user to hit a key on the keyboard to exit  
>>> the
>>> engine.  If we want to put this process in the background, this
>>> isn't a
>>> feasible design obviously...so I was curious what people are  
>>> doing to
>>> build an engine that can be set as a background process and then  
>>> when
>>> brought back to the foreground, how is the engine being stopped
>>> elegantly so the appropriate logout and disconnect procedures occur?
>>>
>>
>> I'd be intersted to hear how others approach this problem as well.  
>> For
>> now, we create the socket initiator and FIX listenrers in Spring, and
>> then the main thread just goes to sleep (we do a new
>> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if  
>> you
>> run it on the console, or with an /etc/init.d script wrapping a 'kill
>> -9' on our virtual appliance. Here's the code for reference:
>> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/
>> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>>
>>
>> --
>> Toli Kuznets
>> http://www.marketcetera.com: Open-Source Trading Platform
>> download.run.trade.
>>
>> ---------------------------------------------------------------------
>> -
>
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>
>
> ----------------------------------------------------------------------
> --
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
> Eurobase International Limited and its subsidiaries (Eurobase) are  
> unable to exercise control over the content of information in E-
> Mails. Any views and opinions expressed may be personal to the  
> sender and are not necessarily those of Eurobase. Eurobase will not  
> enter into any contractual obligations in respect of any part of  
> its business in any E-mail.
>
> Privileged / confidential information may be contained in this  
> message and /or any attachments. This E-mail is intended for the  
> use of the addressee(s) only and may contain confidential  
> information. If you are not the / an intended recipient, you are  
> hereby notified that any use or dissemination of this communication  
> is strictly prohibited.  If you receive this transmission in error,  
> please notify us immediately, and then delete this E-mail.
>
> Neither the sender nor Eurobase accepts any liability whatsoever  
> for any defects of any kind either in or arising from this E-mail  
> transmission. E-Mail transmission cannot be guaranteed to be secure  
> or error-free, as messages can be intercepted, lost, corrupted,  
> destroyed, contain viruses, or arrive late or incomplete. Eurobase  
> does not accept any responsibility for viruses and it is your  
> responsibility to scan any attachments.
>
> Eurobase Systems Limited is the main trading company in the  
> Eurobase International Group; registered in England and Wales as  
> company number 02251162; registered address: Essex House, 2 County  
> Place, Chelmsford, Essex CM2 0RE, UK.
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie questions

gm-mrktc
Hey Tommy and Alex,
I just wanted to add a few resources to the discussion.  The command line we use for starting up the JVM with JMX support is:

java -Dcom.sun.management.jmxremote ...

Additionally we need to do some initialization in our startup code, which you can see here (specifically see line 55, starting with JmxExporter) :

http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/main/java/org/marketcetera/oms/OrderManagementSystem.java

Also there are a couple of pages on the QuickFIX/J site that might be of help.
http://www.quickfixj.org/confluence/display/qfj/QFJ-Specific+JMX+Management+Console
http://www.quickfixj.org/confluence/display/qfj/JMX+Instrumentation

With respect to changing the SenderCompID on the fly, I think that is going to be difficult, because the way QuickFIX/J is architected, sessions with different SenderCompIDs are _different_ sessions.  That is SenderCompID is part of the primary key--if you will-- that identifies a session.  That being said, I have started some work on being able to create new sessions on the fly.

http://www.quickfixj.org/jira/browse/QFJ-165

Would your use case be covered if you could stop one session and start a new one with the new SenderCompID?

graham
 
--
Marketcetera Trading Platform
download.run.trade.
www.marketcetera.org

Tommy Hannon wrote
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Alex,

The SenderCompID is a listed attribute and appears editable, but I  
have not attempted to change this as it is assigned in the "Settings"  
file and we have no need to change it on the fly.

Regarding management... make sure you have made necessary code  
changes depending on your version of Java as described in the user  
manual.  The "jconsole" application is in the java installation "bin"  
subdirectory.  Just run it (you do not need any parameters).  It  
would probably be best if you run it on the same machine as your FIX  
application under the same user.  The process ID will be listed and  
all you have to do is select it and click "connect".  You can also  
run it remotely, but you will probably need to open firewall ports.

I hope that helps.

-Tommy

On Apr 27, 2007, at 5:12 AM, Alex McGlashan wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Hi Tommy,
>
> I was interested to read your note below about updating session
> attributes on the fly.  Does this include new SenderCompID values?
> Could you describe the process for starting the console and connecting
> in a bit more detail?
>
> Thanks in advance,
> Alex
>
>
> -----Original Message-----
> From: quickfixj-users-bounces@lists.sourceforge.net
> [mailto:quickfixj-users-bounces@lists.sourceforge.net] On Behalf Of
> Tommy Hannon
> Sent: 26 April 2007 17:54
> To: quickfixj-users@lists.sourceforge.net
> Subject: Re: [Quickfixj-users] newbie questions
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> I just started developing with QuickFIX/J last week and am totally
> delighted with the ease of use (kinda of like switching to a Mac).
>
> Most everything you need to manage the "grunt-work" of the protocol
> is handled using the "Setting" file as described in the user manual.
> Session level stuff, Logon/Logout, heartbeats, resends, all are
> handled "under-the-hood" and need not be handled at your application
> level code.  IMHO, the greatest benefit to new users is the
> management extensions.
>
> Just add a few lines of code to a Java 1.5 codebase and a system
> property on the command line; start "jconsole" and connect! (Be sure
> to start the console using the same user as your application if
> running locally)  From there the session attributes page is a real
> help. you can view or update values on-the-fly.  Go to the
> "Operations" tab and you can reset, disconnect, logon, or logoff
> individual sessions.
>
> In general this product is very is easy to use, almost beyond
> belief.  My suggestion would be to check out the "Creating Your
> Application", "Receiving Messages" and "Sending Messages" sections of
> the user manual paying attention to the "Most Type Safe" approach.
>
> Good luck!
>
> -Tommy
>
> On Apr 26, 2007, at 10:46 AM, Toli Kuznets wrote:
>
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>> Robert,
>>
>>> 1.)  We plan on connecting to 4 end-points, so I have 4 sessions
>>> in my
>>> configuration file...is there a benefit to using the
>>> ThreadedSocketInitiator as opposed to just the SocketInitiator?
>>
>> This is a classic trade-off. if you need all your incoming  
>> messages to
>> be processed in order they are coming in across all connections, then
>> use the regular SocketInitiator.
>> If the 4 connections are totally unrelated then you can process them
>> concurrently using the ThreadedSocketInitiator
>>
>>>
>>> 2.)  If one of our end-point's connection goes down indefinitely,  
>>> are
>>> the remaining 3 sessions ok?  Say one of the 4 end-points goes down
>>> momentarily and then goes back up, will the engine reconnect or do I
>>> have to bring the entire engine down and reconnect all 4 sessions?
>>
>> QFJ should reconnect to the lost connection when it comes back u and
>> renegotiate a logon.
>> there area various timeout settings you can tweak to modify the
>> timeout behaviour.
>>
>>> 3.)  Examples of the custom Initiator classes have a 'System.in'
>>> statement waiting for a user to hit a key on the keyboard to exit  
>>> the
>>> engine.  If we want to put this process in the background, this
>>> isn't a
>>> feasible design obviously...so I was curious what people are  
>>> doing to
>>> build an engine that can be set as a background process and then  
>>> when
>>> brought back to the foreground, how is the engine being stopped
>>> elegantly so the appropriate logout and disconnect procedures occur?
>>>
>>
>> I'd be intersted to hear how others approach this problem as well.  
>> For
>> now, we create the socket initiator and FIX listenrers in Spring, and
>> then the main thread just goes to sleep (we do a new
>> Semaphore(0).wait()). The OMS is then killed by pressing Ctrl-C if  
>> you
>> run it on the console, or with an /etc/init.d script wrapping a 'kill
>> -9' on our virtual appliance. Here's the code for reference:
>> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/
>> src/main/java/org/marketcetera/oms/OrderManagementSystem.java#L59
>>
>>
>> --
>> Toli Kuznets
>> http://www.marketcetera.com: Open-Source Trading Platform
>> download.run.trade.
>>
>> ---------------------------------------------------------------------
>> -
>
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Quickfixj-users mailing list
>> Quickfixj-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>>
>
>
> ----------------------------------------------------------------------
> --
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> Quickfixj-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
> Eurobase International Limited and its subsidiaries (Eurobase) are  
> unable to exercise control over the content of information in E-
> Mails. Any views and opinions expressed may be personal to the  
> sender and are not necessarily those of Eurobase. Eurobase will not  
> enter into any contractual obligations in respect of any part of  
> its business in any E-mail.
>
> Privileged / confidential information may be contained in this  
> message and /or any attachments. This E-mail is intended for the  
> use of the addressee(s) only and may contain confidential  
> information. If you are not the / an intended recipient, you are  
> hereby notified that any use or dissemination of this communication  
> is strictly prohibited.  If you receive this transmission in error,  
> please notify us immediately, and then delete this E-mail.
>
> Neither the sender nor Eurobase accepts any liability whatsoever  
> for any defects of any kind either in or arising from this E-mail  
> transmission. E-Mail transmission cannot be guaranteed to be secure  
> or error-free, as messages can be intercepted, lost, corrupted,  
> destroyed, contain viruses, or arrive late or incomplete. Eurobase  
> does not accept any responsibility for viruses and it is your  
> responsibility to scan any attachments.
>
> Eurobase Systems Limited is the main trading company in the  
> Eurobase International Group; registered in England and Wales as  
> company number 02251162; registered address: Essex House, 2 County  
> Place, Chelmsford, Essex CM2 0RE, UK.
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> Quickfixj-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
Quickfixj-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: jdbc logging

Robert Brueckmann-2
In reply to this post by Stephen Bate
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
We've removed the NOT NULL constraint (kind of weird since this olumn is
part of the primary key and by oracle standards a column in the primary
key can't be not null so we had to remove that constraint as well...so
we removed these constraints and fired it up...no exceptions now but now
the engine starts up...logs a few messages to the screen which I'll
paste below and then immediately shuts down with no exception or message
of why it's immediately shutting down.

Any thoughts?!?

Here's the console output:

2007-04-27 13:38:24,215 DEBUG [main] proxool.ShutdownHook
(ShutdownHook.java:73) - Registered shutdownHook
2007-04-27 13:38:24,230 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:84) - Registering 'quickfixj-1' house keeper
2007-04-27 13:38:24,230 DEBUG [main] proxool.HouseKeeperController
(HouseKeeperController.java:92) - Starting a house keeper thread
2007-04-27 13:38:26,855 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: isReadOnly()
= false
2007-04-27 13:38:26,871 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getHoldability() = 1
2007-04-27 13:38:26,871 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value:
getTransactionIsolation() = 2
2007-04-27 13:38:26,886 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getTypeMap()
= {SYS.XMLTYPE=class oracle.xdb.XMLTypeFactory}
2007-04-27 13:38:26,886 DEBUG [main] proxool.ConnectionResetter
(ConnectionResetter.java:168) - Remembering default value: getCatalog()
= null
2007-04-27 13:38:26,886 INFO  [main] proxool.ConnectionPool
(ConnectionPool.java:623) - Proxool statistics legend: "s - r  (a/t/o)"
> s=served, r=refused (only shown if non-zero), a=active, t=total,
o=offline (being tested)
2007-04-27 13:38:26,886 DEBUG [main] proxool.Prototyper
(Prototyper.java:204) - 000000 (01/01/00) - Connection #1 created on
demand = ACTIVE
2007-04-27 13:38:27,074 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.ClientDataSupport
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleConnection
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleConnection
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Connection
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.ClobDBAccess
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface oracle.sql.BlobDBAccess
2007-04-27 13:38:27,089 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.sql.BfileDBAccess
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface java.sql.Statement
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OracleStatement
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.OraclePreparedStatement
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
java.sql.PreparedStatement
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OraclePreparedStatement
2007-04-27 13:38:27,855 DEBUG [main] proxool.ProxyFactory
(ProxyFactory.java:209) - Implementing interface
oracle.jdbc.internal.OracleStatement
2007-04-27 13:38:28,574 DEBUG [ShutdownHook] proxool.ShutdownHook
(ShutdownHook.java:93) - Running ShutdownHook
2007-04-27 13:38:28,574 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:490) - Shutting down 'quickfixj-1' pool immediately
[Shutdown Hook]
2007-04-27 13:38:28,589 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:447) - 000004 (00/00/00) - #0001 removed because of
shutdown.
2007-04-27 13:38:28,589 DEBUG [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:553) - Connection #1 closed
2007-04-27 13:38:28,589 INFO  [Shutdown Hook] proxool.ConnectionPool
(ConnectionPool.java:570) - 'quickfixj-1' pool has been closed down by
Shutdown Hook in 15 milliseconds.
2007-04-27 13:38:28,589 INFO  [Shutdown Hook]
proxool.PrototyperController (PrototyperController.java:100) - Stopping
Prototyper thread
2007-04-27 13:38:28,589 INFO  [Shutdown Hook]
proxool.HouseKeeperController (HouseKeeperController.java:107) -
Stopping HouseKeeper thread

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: jdbc logging

Robert Brueckmann-2
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
To add to this, I checked with the DBA and both times I fired up the
engine, it inserted a message in the Sessions table and the Event_Log
table...but then the engine just dies.  I see in the output I pasted in
my last email that Connection #1 is closed...no other explanation though
and I'm assuming this is the cause of the problem...but it's certainly
nothing we're doing on the database side of things...just thought I'd
add that bit of info.

Thanks,
Rob

Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007


 

--------------------------------------------------------

This message contains information from Merlin Securities, LLC, or from one of its affiliates, that may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
 
Merlin Securities, LLC is a registered broker-dealer. Services offered through Merlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed by Merlin Securities, LLC and may lose value. Nothing in this communication shall constitute a solicitation or recommendation to buy or sell a particular security.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
123