SAP-archive / com.sap.openSAP.hana5.example

openSAP HANA5/HANA6 Course: Example Completed Implementation
https://open.sap.com/courses/hana5/
Apache License 2.0
87 stars 81 forks source link

static port of module #10

Closed sergeywp closed 6 years ago

sergeywp commented 6 years ago

Good morning! I faced with problem - when you redeploy XSA application, for different module XSA assigns random ports. I need to assign static port to module. I saw documentation and I found there that in mta.yaml there is parameter port in scope of module, which I can use. As I understood It could help to solve issue. xsa_issue I put those parameter in mta.yaml in Parameters of module: image image

But When I run It - It fails with message in log: "Unexpected type Double for option "port" of app "qs1svgEnowhBkHra-testPort-uiPort", expected Integer!" xsa_issue_s

Do you know, is it possible to fix port in application? And may be I make It wrong?

jung-thomas commented 6 years ago

The Web IDE builder actually only supports a small subset of all the deployer parameters although this looks like a bug to me since its seeing it as a Double. However I wouldn't put the port in the mta.yaml anyway. I'd suggest supplying at deploy time only via mtaext file just like we do with the installation of the SAP Web IDE itself.

It really isn't suggested to try to use lots of static ports however. If you don't like the dynamic port assignment, the the correct solution would be to use hostname based routing instead.