Comments (9)
What's the status of this issue. I'm currently having this issue as a newbie.
from msf4j.
Please see this blog for easy answer: https://teampmblog.wordpress.com/2016/02/08/developing-java-microservices-with-wso2/-
from msf4j.
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.
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.
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:
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.
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#L63However, 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/
- http://www.apache.org/*
_email: *[email protected]* [email protected] - cell: +94 77 3320919blog: *http://blog.afkham.org
http://blog.afkham.org
_twitter: _http://twitter.com/afkham_azeez
http://twitter.com/afkham_azeez
_linked-in: _http://lk.linkedin.com/in/afkhamazeez
http://lk.linkedin.com/in/afkhamazeez
Lean . Enterprise . Middleware
from msf4j.
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.
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/
- http://www.apache.org/*
_email: *[email protected]* [email protected] - cell: +94 77 3320919blog: *http://blog.afkham.org
http://blog.afkham.org
_twitter: _http://twitter.com/afkham_azeez
http://twitter.com/afkham_azeez
_linked-in: _http://lk.linkedin.com/in/afkhamazeez
http://lk.linkedin.com/in/afkhamazeez
Lean . Enterprise . Middleware
from msf4j.
Yes, that's the best approach.
from msf4j.
Related Issues (20)
- NullPointerException when starting the Product SP with v2.6.1
- Documentation of pom entry microservice.resourceClasses HOT 4
- Register custom Gson Type adapter HOT 2
- Update to latest GSON release HOT 1
- in deployable jar - swagger tags disapears
- ERROR ResourceLeakDetector:171 - LEAK: ByteBuf.release() was not called before it's garbage-collected HOT 1
- missing "Microservices:" in META-INF HOT 1
- I can't deploy "Hello world" in wso2ei HOT 7
- msf4j support for cors HOT 2
- msf4j @RequestBody not working HOT 1
- Repetitve doc links in jwt-claims sample README
- Add documentation for matrics interceptor
- Enable HandlerInterceptoTest case after fixing issues in it
- metrics-httpmon-fatjar sample build results in two jars, only one can be executed to start the micro service HOT 1
- Better to have two separate samples to demonstrate HTTP monitoring and Metrics Monitoring
- SwaggerDefinition not working HOT 2
- Websocket example deployable jar not deploying in wso2 ei
- AbstractMethod error and MSF4JResponse HOT 1
- Dependency org.bouncycastle:bcprov-jdk15on, leading to CVE problem HOT 2
- MSF4J Microservice with a custom dependency doesn't work after being deployed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msf4j.