Coder Social home page Coder Social logo

Comments (9)

johnbendi avatar johnbendi commented on August 15, 2024

What's the status of this issue. I'm currently having this issue as a newbie.

from msf4j.

isamauny avatar isamauny commented on August 15, 2024

Please see this blog for easy answer: https://teampmblog.wordpress.com/2016/02/08/developing-java-microservices-with-wso2/-

from msf4j.

ayomawdb avatar ayomawdb commented on August 15, 2024

Corrected link (removing the additional hyphen):
https://teampmblog.wordpress.com/2016/02/08/developing-java-microservices-with-wso2/

For additional details, you can also check MicroservicesRunner.java

from msf4j.

senakafdo avatar senakafdo commented on August 15, 2024

You can use the answer from @isamauny or change the code from new MicroservicesRunner() to new MicroservicesRunner(Integer.getInteger("http.port", 8080)). That way you can pass in the port as a system property when you start up (i.e. java -Dhttp.port=8081 -jar target/stockquote-fatjar-1.1.0-SNAPSHOT.jar).

from msf4j.

imesh avatar imesh commented on August 15, 2024

As @senakafdo has mentioned, it would be really useful if we can change the port using a system parameter at the runtime. I can see we have added a comment on this in MicroservicesRunner class:

https://github.com/wso2/msf4j/blob/master/core/src/main/java/org/wso2/msf4j/MicroservicesRunner.java#L63

However, we have not given instructions on how to create the transports.netty.conf file. Creating a file for overriding the port might be an overhead. Shall we re-think this, please? @afkham WDYT Thanks!

from msf4j.

afkham avatar afkham commented on August 15, 2024

This works only for HTTP. For HTTPS, we may anyway require to give all the
relevant details. So what we can do it pass it as an arg to the main
method, if you are to change just the HTTP port.

On Thu, Nov 10, 2016 at 12:20 PM, Imesh Guaratne [email protected]
wrote:

As @senakafdo https://github.com/senakafdo has mentioned, it would be
really useful if we can change the port using a system parameter at the
runtime. I can see we have added a comment on this in MicroservicesRunner
class:

https://github.com/wso2/msf4j/blob/master/core/src/main/
java/org/wso2/msf4j/MicroservicesRunner.java#L63

However, we have not given instructions on how to create the
transports.netty.conf file. Creating a file for overriding the port might
be an overhead. Shall we re-think this, please? @afkham
https://github.com/afkham WDYT Thanks!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#130 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACiBtQmhog2LuDq680zKFJx0b5pEwLNFks5q8r7EgaJpZM4HUc1C
.

Afkham Azeez
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/

Lean . Enterprise . Middleware

from msf4j.

senakafdo avatar senakafdo commented on August 15, 2024

Hi @afkham, @imesh, the reason why we wanted to change the port using a system property is to be able to spawn multiple instances of the same microservice from a CLI without having to recompile the code and/or build individual transport configurations for that very purpose.

from msf4j.

afkham avatar afkham commented on August 15, 2024

java -jar foo.jar 9090

So, args[0]=9090

You don't have to hardcode anything.

On Thu, Nov 10, 2016 at 3:32 PM, Senaka Fernando [email protected]
wrote:

Hi @afkham https://github.com/afkham, @imesh https://github.com/imesh,
the reason why we wanted to change the port using a system property is to
be able to spawn multiple instances of the same microservice from a CLI
without having to recompile the code and/or build individual transport
configurations for that very purpose.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#130 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACiBtTnb-ymjCtIigZakbSe9aK8Pl1eLks5q8uudgaJpZM4HUc1C
.

Afkham Azeez
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/

Lean . Enterprise . Middleware

from msf4j.

senakafdo avatar senakafdo commented on August 15, 2024

Yes, that's the best approach.

from msf4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.