Re: svn commit: r595217 - /incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

2007-11-19 Thread ant elder
On Nov 17, 2007 5:49 PM, Jean-Sebastien Delfino [EMAIL PROTECTED]
wrote:

snip

I was only considering the first composite as I still think that a node
 should only run a single composite :)


Ok, any helpful suggestions on the discussion in [1] relating to problems
starting a domain and multiple nodes in the same webapp/Tomcat/Geronimo
instance?

   ...ant

[1]
http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200711.mbox/[EMAIL 
PROTECTED]


Re: svn commit: r595217 - /incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

2007-11-19 Thread Simon Laws
On Nov 19, 2007 2:49 PM, ant elder [EMAIL PROTECTED] wrote:

 On Nov 17, 2007 5:49 PM, Jean-Sebastien Delfino [EMAIL PROTECTED]
 wrote:

 snip

 I was only considering the first composite as I still think that a node
  should only run a single composite :)
 
 
 Ok, any helpful suggestions on the discussion in [1] relating to problems
 starting a domain and multiple nodes in the same webapp/Tomcat/Geronimo
 instance?

   ...ant

 [1]

 http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200711.mbox/[EMAIL 
 PROTECTED]

Ant

I've been thinking about this a little so I'll reply on the original thread.

On the subject of this thread...

I understand what you are trying to do now. Thanks for the explanation. I
still think it feels a little odd that is takes a port number from one of
the bindings. If you haven't specified a uri in a binding then I guess you
don't care what port number you get. So choosing a port number from a
binding doesn't do any harm and is slightly more efficient in terms of port
resources then using the default port number that the node invents when no
node url is provided. Just justifying it to myself ;-)

Simon


Re: svn commit: r595217 - /incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

2007-11-17 Thread Jean-Sebastien Delfino

Simon Laws wrote:

On Nov 15, 2007 5:59 AM, [EMAIL PROTECTED] wrote:

  

Author: jsdelfino
Date: Wed Nov 14 21:59:04 2007
New Revision: 595217

URL: http://svn.apache.org/viewvc?rev=595217view=rev
Log:
Configure the default HTTP port from service uris declared in the
composite running on a node.

Modified:

 
incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

Modified:
incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java?rev=595217r1=595216r2=595217view=diff

==
---
incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
(original)
+++
incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
Wed Nov 14 21:59:04 2007
@@ -417,7 +417,6 @@
/**
 * Configure the default HTTP port for this node.
 */
-/*
private void configureDefaultPort() {
Composite composite = composites.get(compositesToStart.get(0));
if (composite == null) {
@@ -472,7 +471,7 @@
}
}
}
-*/
+
private void startComposites() throws NodeException {
try {
if (compositesToStart.size() == 0 ){
@@ -481,7 +480,7 @@
} else {

// Configure the default server port for the node
-//configureDefaultPort();
+configureDefaultPort();

for (QName compositeName : compositesToStart) {
Composite composite = composites.get(compositeName);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hi Sebastien



I'm guessing you needed this back into play because you happened to get the
trunk between Ant's checkins to allow the default path to be specified
rather than just the port.  For a time, by accident,  the node wasn't
setting the default HTTP information at all.
  


No problem, debugging was fun. That'll teach me to not do an svn update 
just a few hours before giving a demo :)



I'm a little confused by this code as it seems to be trying to find the
first valid port number from domain level or composite level services in the
first composite running in the node. If it finds one it uses it as the
default port, if not it takes the port from the node uri.  Why is it
important to set the default port in this way?

I though that getting the port number from the Node URL or inventing one if
the Node URL is not provided would be sufficient. If someone specifies one
in a URL in a binding shouldn't that be used anyhow and override any default
setting? There must be a case I'm missing.

Simon

  


I was only considering the first composite as I still think that a node 
should only run a single composite :)


Then the node did not specify a port, and if the composite specifies a 
port number on one of its bindings, it's probably an OK default for the 
other services that don't specify a port number.


In 
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tutorial/store/store.composite 
for example:


service name=Widget
 t:binding.http uri=http://localhost:8100/ui/
/service

binds the widget service to port 8100. The other services will be 
available on the same port without having to specify it.


--
Jean-Sebastien


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r595217 - /incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

2007-11-15 Thread Simon Laws
On Nov 15, 2007 5:59 AM, [EMAIL PROTECTED] wrote:

 Author: jsdelfino
 Date: Wed Nov 14 21:59:04 2007
 New Revision: 595217

 URL: http://svn.apache.org/viewvc?rev=595217view=rev
 Log:
 Configure the default HTTP port from service uris declared in the
 composite running on a node.

 Modified:

  
 incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java

 Modified:
 incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
 URL:
 http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java?rev=595217r1=595216r2=595217view=diff

 ==
 ---
 incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
 (original)
 +++
 incubator/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCANodeImpl.java
 Wed Nov 14 21:59:04 2007
 @@ -417,7 +417,6 @@
 /**
  * Configure the default HTTP port for this node.
  */
 -/*
 private void configureDefaultPort() {
 Composite composite = composites.get(compositesToStart.get(0));
 if (composite == null) {
 @@ -472,7 +471,7 @@
 }
 }
 }
 -*/
 +
 private void startComposites() throws NodeException {
 try {
 if (compositesToStart.size() == 0 ){
 @@ -481,7 +480,7 @@
 } else {

 // Configure the default server port for the node
 -//configureDefaultPort();
 +configureDefaultPort();

 for (QName compositeName : compositesToStart) {
 Composite composite = composites.get(compositeName);



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 Hi Sebastien

I'm guessing you needed this back into play because you happened to get the
trunk between Ant's checkins to allow the default path to be specified
rather than just the port.  For a time, by accident,  the node wasn't
setting the default HTTP information at all.

I'm a little confused by this code as it seems to be trying to find the
first valid port number from domain level or composite level services in the
first composite running in the node. If it finds one it uses it as the
default port, if not it takes the port from the node uri.  Why is it
important to set the default port in this way?

I though that getting the port number from the Node URL or inventing one if
the Node URL is not provided would be sufficient. If someone specifies one
in a URL in a binding shouldn't that be used anyhow and override any default
setting? There must be a case I'm missing.

Simon