Trying to run Quickfixj in Spring Boot

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

Trying to run Quickfixj in Spring Boot

Peter Adelmann
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



Hi,

 

I’m new to QFJ and have been posting questions. Thanks for your patience.

 

I’m trying to bring QFJ up in a Spring boot container. Perhaps this is very incorrect, bringing an application up in an application. I’m running into build issues concerning fix42.jar not found so I haven’t even tried this and maybe I should be using something like Camel, not sure. But up to this point, we’ve been able to instantiate with Spring Boot with something like this:

 

public class QuickfixjApplication {

 

       public static void main(String[] args) {

              SpringApplication.run(MyExtendedQFJApplication.class, args);

       }

}

 

Has anyone tried this? I haven’t gotten to this point yet, but I have a config file which I hope will render a SessionID to my application. My REST class(controller) will expose methods to the caller. But if I can bring up the application with Spring boot, I guess somehow I can communicate with it. That’s not clear to me either because I don’t think I can get an instance of the application to call the methods. I don’t think I want to create anything like a messagehandler to get an instance of MessageCracker. This might be easy but it seems very challenging.

Thanks,

Peter Adelmann  


Investment Advisory Services are offered through RobustWealth, a registered investment adviser. Please remember that securities cannot be purchased, sold or traded via e-mail or voice message system. This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or any action or omission of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone at (609) 483-8101 or return and delete the original transmission and its attachments without reading or saving in any manner.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Trying to run Quickfixj in Spring Boot

Colin DuPlantis
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



There's no reason why you can't use QFJ in Spring Boot.

What you have is fine, though you can also define your QFJ Application separately and define it as a @Component or some such and it will be created by Spring at start.

How you create your QFJ App isn't really relevant to where it gets its config.


On 05/25/2017 08:46 AM, Peter Adelmann wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/




Hi,

 

I’m new to QFJ and have been posting questions. Thanks for your patience.

 

I’m trying to bring QFJ up in a Spring boot container. Perhaps this is very incorrect, bringing an application up in an application. I’m running into build issues concerning fix42.jar not found so I haven’t even tried this and maybe I should be using something like Camel, not sure. But up to this point, we’ve been able to instantiate with Spring Boot with something like this:

 

public class QuickfixjApplication {

 

       public static void main(String[] args) {

              SpringApplication.run(MyExtendedQFJApplication.class, args);

       }

}

 

Has anyone tried this? I haven’t gotten to this point yet, but I have a config file which I hope will render a SessionID to my application. My REST class(controller) will expose methods to the caller. But if I can bring up the application with Spring boot, I guess somehow I can communicate with it. That’s not clear to me either because I don’t think I can get an instance of the application to call the methods. I don’t think I want to create anything like a messagehandler to get an instance of MessageCracker. This might be easy but it seems very challenging.

Thanks,

Peter Adelmann  


Investment Advisory Services are offered through RobustWealth, a registered investment adviser. Please remember that securities cannot be purchased, sold or traded via e-mail or voice message system. This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or any action or omission of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone at (609) 483-8101 or return and delete the original transmission and its attachments without reading or saving in any manner.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

-- 
Colin DuPlantis
Chief Architect, Marketcetera
Download, Run, Trade
888.868.4884 +1.541.306.6556
http://www.marketcetera.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Trying to run Quickfixj in Spring Boot

Jose Chavez
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



For this class: MyExtendedQFJApplication.class, is it implementing the quickfix.Application interface? 

There is some setup involved to startup QFJ. I highly suggest you read through the documentation first, it would help give some insight into the library's architecture.

Here is the link, at the bottom is a sample code to get started. You can create a bean that can be configured with the given objects. Then create a startup method called by Spring to start the initiator/acceptor.


Thanks,

Jose E. Chavez

On Thu, May 25, 2017 at 10:56 AM, Colin DuPlantis <[hidden email]> wrote:
QuickFIX/J Documentation: <a href="http://www.quickfixj.org/documentation/ QuickFIX/J" rel="noreferrer" target="_blank">http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



There's no reason why you can't use QFJ in Spring Boot.

What you have is fine, though you can also define your QFJ Application separately and define it as a @Component or some such and it will be created by Spring at start.

How you create your QFJ App isn't really relevant to where it gets its config.


On 05/25/2017 08:46 AM, Peter Adelmann wrote:
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/




Hi,

 

I’m new to QFJ and have been posting questions. Thanks for your patience.

 

I’m trying to bring QFJ up in a Spring boot container. Perhaps this is very incorrect, bringing an application up in an application. I’m running into build issues concerning fix42.jar not found so I haven’t even tried this and maybe I should be using something like Camel, not sure. But up to this point, we’ve been able to instantiate with Spring Boot with something like this:

 

public class QuickfixjApplication {

 

       public static void main(String[] args) {

              SpringApplication.run(MyExtendedQFJApplication.class, args);

       }

}

 

Has anyone tried this? I haven’t gotten to this point yet, but I have a config file which I hope will render a SessionID to my application. My REST class(controller) will expose methods to the caller. But if I can bring up the application with Spring boot, I guess somehow I can communicate with it. That’s not clear to me either because I don’t think I can get an instance of the application to call the methods. I don’t think I want to create anything like a messagehandler to get an instance of MessageCracker. This might be easy but it seems very challenging.

Thanks,

Peter Adelmann  


Investment Advisory Services are offered through RobustWealth, a registered investment adviser. Please remember that securities cannot be purchased, sold or traded via e-mail or voice message system. This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or any action or omission of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone at <a href="tel:(609)%20483-8101" value="+16094838101" target="_blank">(609) 483-8101 or return and delete the original transmission and its attachments without reading or saving in any manner.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

-- 
Colin DuPlantis
Chief Architect, Marketcetera
Download, Run, Trade
<a href="tel:(888)%20868-4884" value="+18888684884" target="_blank">888.868.4884 <a href="tel:(541)%20306-6556" value="+15413066556" target="_blank">+1.541.306.6556
http://www.marketcetera.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Trying to run Quickfixj in Spring Boot

Peter Adelmann
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Hi,
When I try to run the QFJ application from Spring I receive the following error:
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

The application does not run. It does compile. I realize this is beginning to look like more of a Spring-Boot issue and not a QFJ issue. Didn't know if someone had encountered this complaint by Spring. When I searched the exception the suggestion was to add

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
to my pom file. However this didn't fix the issue.
Thanks,
Peter Adelmann

-----Original Message-----
From: Jose Chavez [mailto:[hidden email]]
Sent: Thursday, May 25, 2017 1:43 PM
To: [hidden email]
Subject: Re: [Quickfixj-users] Trying to run Quickfixj in Spring Boot

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


________________________________
 Investment Advisory Services are offered through RobustWealth, a registered investment adviser. Please remember that securities cannot be purchased, sold or traded via e-mail or voice message system. This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or any action or omission of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone at (609) 483-8101 or return and delete the original transmission and its attachments without reading or saving in any manner.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Trying to run Quickfixj in Spring Boot

Peter Adelmann
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/


Ignore this message. I got things squared away.
Peter

-----Original Message-----
From: Peter Adelmann [mailto:[hidden email]]
Sent: Friday, May 26, 2017 10:22 AM
To: [hidden email]
Subject: Re: [Quickfixj-users] Trying to run Quickfixj in Spring Boot

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


Hi,
When I try to run the QFJ application from Spring I receive the following error:
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

The application does not run. It does compile. I realize this is beginning to look like more of a Spring-Boot issue and not a QFJ issue. Didn't know if someone had encountered this complaint by Spring. When I searched the exception the suggestion was to add

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
to my pom file. However this didn't fix the issue.
Thanks,
Peter Adelmann

-----Original Message-----
From: Jose Chavez [mailto:[hidden email]]
Sent: Thursday, May 25, 2017 1:43 PM
To: [hidden email]
Subject: Re: [Quickfixj-users] Trying to run Quickfixj in Spring Boot

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


________________________________
 Investment Advisory Services are offered through RobustWealth, a registered investment adviser. Please remember that securities cannot be purchased, sold or traded via e-mail or voice message system. This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or any action or omission of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone at (609) 483-8101 or return and delete the original transmission and its attachments without reading or saving in any manner.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users