DO NOT REPLY [Bug 33755] New: - Documentation enhancement to JNDI-Datasources-examples for Postgres

2005-02-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33755

   Summary: Documentation enhancement to JNDI-Datasources-examples
for Postgres
   Product: Tomcat 5
   Version: Nightly Build
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I struggled quite a bit defining a Postgres datasource with Tomcat, but finally
succeeded. To prevent the suffering of others, here are some enhancements to the
JNDI datasource web page that should make things easier for others. Diff is
against the current CVS checkout of Tomcat 5.

Index: jndi-datasource-examples-howto.xml
===
RCS file:
/home/cvspublic/jakarta-tomcat-catalina/webapps/docs/jndi-datasource-examples-howto.xml,v
retrieving revision 1.13
diff -u -3 -p -u -r1.13 jndi-datasource-examples-howto.xml
--- jndi-datasource-examples-howto.xml  27 Sep 2004 16:00:31 -  1.13
+++ jndi-datasource-examples-howto.xml  27 Feb 2005 05:47:12 -
@@ -335,16 +335,66 @@ Connection conn = ds.getConnection();

 
 0.Introduction
-PostgreSQL is configured in a similar manner to Oracle. Again, highlighting
the differences.
-These notes are untested as yet and we would appreciate feedback.
-1.server.xml configuration
+PostgreSQL is configured in a similar manner to Oracle.
+
+1. Required files 
+
+Copy the Postgres JDBC jar to $CATALINA_HOME/common/lib. As with Oracle, the
+jars need to be in this directory in order for DBCP's Classloader to find
+them. This has to be done regardless of which configuration step you take next.
+
+
+2. Resource configuration
+
+
+You have two choices here: define a datasource that is shared across all Tomcat
+applications, or define a datasource specifically for one application.
+
+
+2a. Shared resource configuration
+
+Use this option if you wish to define a datasource that is shared across
+multiple Tomcat applications, or if you just prefer defining your datasource
+in this file.
+
+This author has not had success here, although others have reported so.
+Clarification would be appreciated here.
+
 
 
+  username="myuser" password="mypasswd" maxActive="20" maxIdle="10"
maxWait="-1"/>
+
 
-2.web.xml configuration
+
+2b. Application-specific resource configuration
+
+
+Use this option if you wish to define a datasource specific to your 
application,
+not visible to other Tomcat applications. This method is less invasive to your
+Tomcat installation.
+
+
+
+Create a resource definition file for your application defining the
+datasource. This file must have the same name as your application, so if
+your application deploys as someApp.war, this filename must
+be someApp.xml. This file should look something like the 
following.
+
+
+
+
+
+
+
+
+
+3. web.xml configuration
 
 
  postgreSQL Datasource example
@@ -353,6 +403,28 @@ These notes are untested as yet and we w
  Container
 
 
+
+
+4. Accessing the datasource
+
+When accessing the datasource programmatically, remember to prepend
java:/comp/env to your JNDI lookup, as in the following snippet of
code. Note
+also that "jdbc/postgres" can be replaced with any value you prefer, provided
+you change it in the above resource definition file as well.
+

+
+
+InitialContext cxt = new InitialContext();
+if ( cxt == null ) {
+   throw new Exception("Uh oh -- no context!");
+}
+
+DataSource ds = (DataSource) cxt.lookup( "java:/comp/env/jdbc/postgres" );
+
+if ( cxt == null ) {
+   throw new Exception("Data source not found!");
+}
+
+
 
 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mai

DO NOT REPLY [Bug 33753] - tag in web.xml is ignored. Servlet 2.4 spec.

2005-02-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33753


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-02-26 17:39 ---
This stuff is part of the J2EE 1.4 specification, like all the EJB references.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Mladen Turk
Peter Rossbach wrote:
Hello Mladen,
Great, now my cluster hot standby works as aspected. Thanks for your 
quick help!
Well, AFAICT you are commiter too, so, feel free to commit any changes
that will fit better ;).
How can I force a autoreloading with update the workers.properties, 
without gracefull restart the apache?

Can not. Only JkMountFile can be reloaded at runtime.
For such a feature we will need AJP14 and something
completely different then mod_jk.
If you wish to add new worker at runtime, you will either
have to predict that, and add disabled worker in config
or restart the apache.
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Peter Rossbach
Hello Mladen,
Great, now my cluster hot standby works as aspected. Thanks for your 
quick help!
Current support of redirect is enough for me.

The domain 
redirect use case to startup very save a next software generation
is working with the existing domain concept.

You have two tomcat cluster domains.
Two Apaches and three tomcat instances at every cluster domain.
worker.nodeA01.domain=A0
worker.nodeA02.domain=A0
worker.nodeA03.domain=A0
worker.nodeB01.domain=B0
worker.nodeB02.domain=B0
worker.nodeB03.domain=B0
worker.list=lb,status
worker.lb.balance_workers=nodeA01,nodeA02,nodeA03,nodeB01,nodeB02,nodeB03
worker.lb.type=lb
worker.status.type=status
Now you want start a new software generation under high load
Start the new Instance A1x, B1x
change the workers.properties at apache A and B
gracefull restart the apaches.
worker.nodeA01.domain=A0
worker.nodeA01.disabled=True
worker.nodeA02.domain=A0
worker.nodeA02.disabled=True
worker.nodeA03.domain=A0
worker.nodeA03.disabled=True
worker.nodeB01.domain=B0
worker.nodeB01.disabled=True
worker.nodeB02.domain=B0
worker.nodeB02.disabled=True
worker.nodeB03.domain=B0
worker.nodeB03.disabled=True
worker.nodeA11.domain=A1
worker.nodeA12.domain=A1
worker.nodeA13.domain=A1
worker.nodeB11.domain=B1
worker.nodeB12.domain=B1
worker.nodeB13.domain=B1
worker.list=lb,status
worker.lb.balance_workers=nodeA11,nodeA12,nodeA13,nodeB11,nodeB12,nodeB13,nodeA01,nodeA02,nodeA03,nodeB01,nodeB02,nodeB03
worker.lb.type=lb
worker.status.type=status
Old Session A0x, B0x working very well for old existing session and 
replicated backup.
All new sessions goes to A1x,B1x nodes
After a some times, the admin can drop the old nodes (A0x, B0x) with 
zero sessions active and than remove the
A0x and B0x workers.

How can I force a autoreloading with update the workers.properties, 
without gracefull restart the apache?

Thanks very much,
Peter
Mladen Turk schrieb:
Mladen Turk wrote:
You will still need the redirect for hot-standby to work.
It's just like for workers, except that instead worker
name the domain is used, so you can have multiple
failover boxes.
Sorry, It won't failover to domain, so:
worker.node1.domain=A
worker.node1.redirect=node3
worker.node2.domain=A
worker.node2.redirect=node3
worker.node3.domain=A
worker.node3.disabled=True
I'll see if and how a failover redirection
for hot standby can be made to a group of workers.
Not sure if this will have any real world usage, but
it can be made.
Convince me why would someone need 5 boxes not doing
anything just in case. I mean, a single one should be
enough ;).
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Mladen Turk
Mladen Turk wrote:
You will still need the redirect for hot-standby to work.
It's just like for workers, except that instead worker
name the domain is used, so you can have multiple
failover boxes.
Sorry, It won't failover to domain, so:
worker.node1.domain=A
worker.node1.redirect=node3
worker.node2.domain=A
worker.node2.redirect=node3
worker.node3.domain=A
worker.node3.disabled=True
I'll see if and how a failover redirection
for hot standby can be made to a group of workers.
Not sure if this will have any real world usage, but
it can be made.
Convince me why would someone need 5 boxes not doing
anything just in case. I mean, a single one should be
enough ;).
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Peter Rossbach
Hello Mladen,
no, the redirect domain feature don't work for me.
Here my configuration:
worker.list=lb,status
worker.node1.port=9012
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.disabled=true
worker.node1.domain=B
worker.node2.port=9022
worker.node2.host=localhost
worker.node2.type=ajp13
worker.node2.disabled=false
worker.node2.domain=A
worker.node2.redirect=B
worker.node3.port=9032
worker.node3.host=localhost
worker.node3.type=ajp13
worker.node3.disabled=false
worker.node3.domain=A
worker.node3.redirect=B
worker.lb.balance_workers=node1,node2,node3
worker.lb.type=lb
worker.status.type=status
Both described szenarios (last email) don't work with the domain 
redirect config.

Peter
Mladen Turk schrieb:
Peter Rossbach wrote:
Morning Mladen,
I have build with newest patch and the redirect working well. Thanks :-)

Great.
But the same szenario with domains don't work
You will still need the redirect for hot-standby to work.
It's just like for workers, except that instead worker
name the domain is used, so you can have multiple
failover boxes.
worker.node1.domain=A
worker.node1.redirect=B
worker.node2.domain=A
worker.node2.redirect=B
worker.node3.domain=B
Tell me if it's work.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


[GUMP@brutus]: Project jakarta-tomcat-jk-native (in module jakarta-tomcat-connectors) failed

2005-02-26 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project jakarta-tomcat-jk-native has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 39 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- jakarta-tomcat-jk-native :  Connectors to various web servers


Full details are available at:

http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason build failed



The following work was performed:
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/gump_work/build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native.html
Work Name: build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native (Type: 
Build)
Work ended in a state of : Failed
Elapsed: 
Command Line: make 
[Working Directory: 
/usr/local/gump/public/workspace/jakarta-tomcat-connectors/jk/native]
-
Making all in common
make[1]: Entering directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
/bin/sh 
/usr/local/gump/public/workspace/apache-httpd/dest-26022005/build/libtool 
--silent --mode=compile gcc 
-I/usr/local/gump/public/workspace/apache-httpd/dest-26022005/include -g -O2 -g 
-O2 -pthread -DHAVE_APR 
-I/usr/local/gump/public/workspace/apr/dest-26022005/include/apr-1 -g -O2 
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE 
-I/home/gump/workspaces2/public/workspace/apache-httpd/srclib/pcre -I 
/opt/jdk1.4/include -I /opt/jdk1.4/include/ -c jk_ajp12_worker.c 
/usr/local/gump/public/workspace/apache-httpd/dest-26022005/build/libtool: 
/usr/local/gump/public/workspace/apache-httpd/dest-26022005/build/libtool: No 
such file or directory
make[1]: *** [jk_ajp12_worker.lo] Error 127
make[1]: Leaving directory 
`/home/gump/workspaces2/public/workspace/jakarta-tomcat-connectors/jk/native/common'
make: *** [all-recursive] Error 1
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/rss.xml
- Atom: 
http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 2226022005, brutus:brutus-public:2226022005
Gump E-mail Identifier (unique within run) #10.

--
Apache Gump
http://gump.apache.org/ [Instance: brutus]

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



DO NOT REPLY [Bug 33753] New: - tag in web.xml is ignored. Servlet 2.4 spec.

2005-02-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33753

   Summary:  tag in web.xml is ignored. Servlet 2.4
spec.
   Product: Tomcat 5
   Version: 5.5.7
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The Servlet 2.4 specification allows a  tag in a web application's
web.xml file. This sets up a JAX-RPC web service and makes it available to the
web application.

I have added the following to my web.xml to try and use the web service
available at https://services.betfair.com/


Betfair Web Service - Sport
service/betfair/Sport
   
com.emobus.betfair.webservice.Sport_Service
WEB-INF/wsdl/services.betfair.com.wsdl
   
WEB-INF/services.betfair.com-jaxrpc-mapping.xml
betfair:Sport



Betfair Web Service - Login
service/betfair/Login

com.emobus.betfair.webservice.Login
WEB-INF/wsdl/services.betfair.com.wsdl
   
WEB-INF/services.betfair.com-jaxrpc-mapping.xml
betfair:Login




This appears to be completely ignored by Tomcat 5.5.

I'm declaring my web.xml correctly for version 2.4 of the servlet spec:

http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 xmlns:betfair="http://services.betfair.com";
 version="2.4">


Does Tomcat not support the  tag? If not, how can it be servlet
spec 2.4 compliant?

Many thanks,
Dave

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Mladen Turk
Peter Rossbach wrote:
Morning Mladen,
I have build with newest patch and the redirect working well. Thanks :-)
Great.
But the same szenario with domains don't work
You will still need the redirect for hot-standby to work.
It's just like for workers, except that instead worker
name the domain is used, so you can have multiple
failover boxes.
worker.node1.domain=A
worker.node1.redirect=B
worker.node2.domain=A
worker.node2.redirect=B
worker.node3.domain=B
Tell me if it's work.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSender.java LocalStrings.properties

2005-02-26 Thread pero
pero2005/02/26 01:12:26

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp
DataSender.java LocalStrings.properties
  Log:
  fix missing message resource and change a resource name
  
  Revision  ChangesPath
  1.2   +1 -1  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
  
  Index: DataSender.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataSender.java   15 Feb 2005 09:31:45 -  1.1
  +++ DataSender.java   26 Feb 2005 09:12:26 -  1.2
  @@ -370,7 +370,7 @@
   if(isSocketConnected) {
   socketCloseCounter++;
   if (log.isDebugEnabled())
  -log.debug(sm.getString("IDataSender.socketclose",
  +log.debug(sm.getString("IDataSender.closeSocket",
   address, new Integer(port)));
   try {
   sc.close();
  
  
  
  1.2   +2 -1  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings.properties   15 Feb 2005 09:26:19 -  1.1
  +++ LocalStrings.properties   26 Feb 2005 09:12:26 -  1.2
  @@ -4,8 +4,9 @@
   IDataSender.connect=Sender connect to [{0}:{1,number,integer}]
   IDataSender.create=Create sender [{0}:{1,number,integer}]
   IDataSender.disconnect=Sender disconnect from [{0}:{1,number,integer}]
  -IDataSender.socketclose=Sender close socket to [{0}:{1,number,integer}]
  +IDataSender.closeSocket=Sender close socket to [{0}:{1,number,integer}]
   IDataSender.missing.ack=Wasn't able to read acknowledgement from 
server[{0}:{1,number,integer}] in {2,number,integer} ms. Disconnecting socket, 
and trying again.
  +IDataSender.openSocket=Sender open socket to [{0}:{1,number,integer}]
   IDataSender.send.again=Send data again to [{0}:{1,number,integer}]
   IDataSender.send.message=Send message to [{0}:{1,number,integer}] id=[{2}] 
size={3,number,integer}
   IDataSender.stats=Send stats from [{0}:{1,number,integer}] Nr of bytes 
sent={2,number,integer} over {3} == {4,number,integer} bytes/request
  
  
  

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



Re: JK Removing local_worker and local_worker_only directives

2005-02-26 Thread Peter Rossbach
Morning Mladen,
I have build with newest patch and the redirect working well. Thanks :-)
But the same szenario with domains don't work
workers.properties:

worker.list=lb,status
worker.node1.port=9012
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.disabled=true
worker.node1.domain=A
#worker.node1.redirect=node2
worker.node2.port=9022
worker.node2.host=localhost
worker.node2.type=ajp13
worker.node2.disabled=false
worker.node2.domain=A
#worker.node2.redirect=node1
worker.node3.port=9032
worker.node3.host=localhost
worker.node3.type=ajp13
worker.node3.disabled=false
worker.node3.domain=A
worker.lb.balance_workers=node1,node2,node3
worker.lb.type=lb
worker.status.type=status
szenarios:
node1 is disabled
node2 is active
node3 is active
start only node1
start firefox
Request failed with Internal Error
szenario 2
node1 is disabled
node2 is active
start node1, node2
request successfull
stop node2
request failed
Start a new Browser (mozilla) request failed again with Internat Error
Peter
Mladen Turk schrieb:
Peter Rossbach wrote:
Well,
It works only for old requests, but new request get an Internal 
Server Error!

Yes, seems that my test case was broken.
It should work now. Can you check?
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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