DO NOT REPLY [Bug 49426] Manager app wrongly localized

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49426

--- Comment #5 from Marc Guillemot  2010-06-15 03:11:56 
EDT ---
(In reply to comment #4)
> (In reply to comment #3)
> > OK, you're right. What about holding the ResourceBundle in a ThreadLocal?
> 
> Given all the issues we have seen with memory leaks and ThreadLocals I'd
> rather not.
> 
> Some additional thoughts:
> - we could just pass the Locale around with the writer

this would be the only solution when ThreadLocal is not wanted. I didn't want
to choose this way as it means more changes but I can do it.
Rather than passing writer and Locale (or ResourceBundle) everywhere along the
way, I could imagine having a wrapper for both.

> - I wonder how hard it would be to extend StringManager (efficiently - which
> may be the slightly tricky bit) to support multiple Locales

this wouldn't solve previous point: you have to be able to access the Locale
each time you need to get a String.
Additionally StringManager is quite useless. StringManager's cache doesn't make
sense as java.util.ResourceBundle has already one. This means that the only
value of StringManager is the facility method getString(final String key, final
Object... args).

> - in determining which Locale to use we need to call request.getLocales() and
> check each in turn until we find a suitable match.

this is correct. I didn't do it to keep the patch smaller in a first time but I
can adapt patch (including unit test) for that now if you want.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE] Release build 6.0.27

2010-06-15 Thread jean-frederic clere
The candidates binaries are available here:
http://people.apache.org/~jfclere/tomcat-6/v6.0.27/

According to the release process, the 6.0.27 build corresponding to the
tag TOMCAT_6_0_27 is:
[ ] Broken
[ ] Alpha
[ ] Beta
[ ] Stable

Cheers

Jean-Frederic

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49442] New: Make StringManager fields final

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49442

   Summary: Make StringManager fields final
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: s...@apache.org


Created an attachment (id=25592)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25592)
Patch to make fields final

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: ISAPI Redirector issue | Building |

2010-06-15 Thread vini mr
Hi dev team,

My all build related issues have been resolved. !

the root cause of issue was like,i forgot to install the windows 2003 server
platform sdk,
After installing and configuring the SDK and  i compiled the source with
customization every problem got resolved.
I am really thankful to Mladen turk, len.popp ,sebb ,rainer jung. for their
quick response and accurate solution :)

With Regard's
vinay.


On Mon, Jun 14, 2010 at 9:40 PM, Len Popp  wrote:

> On Mon, Jun 14, 2010 at 10:51, Mladen Turk  wrote:
>
> > You will also need the Server 2003r2 platform SDK, and if
> > building from GUI adjust the include and lib directories
> > from the SDK to take precedence over the ones from visual studio.
> >
>
> After you install the Server 2003 Platform SDK, here's how to tell Visual
> Studio 6 to use the new platform SDK:
> - Run VS6.
> - Open the View > Options dialog.
> - Add the appropriate directories for the Server 2003 Platform SDK.
> - Note that you must add include, lib and source directories separately,
> using the "Show directories for" dropdown.
> - Make sure the new directories are at the top of the list, so they are
> searched first.
>
> The procedure for Visual Studio 2008 is similar.
>
> FYI, the compile error messages have to do with items defined in httpext.h,
> which are not present in older versions of the Platform SDK.
> --
> Len
>


Re: [VOTE] Release Apache Tomcat 7.0.0 as beta

2010-06-15 Thread Tim Funk

> [X] Beta   - go ahead and release as 7.0.0 Beta

-Tim

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49443] New: RemoteIpValve : remoteIpHeader vs remoteIPHeader

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49443

   Summary: RemoteIpValve : remoteIpHeader vs remoteIPHeader
   Product: Tomcat 6
   Version: 6.0.26
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: minor
  Priority: P2
 Component: Documentation
AssignedTo: dev@tomcat.apache.org
ReportedBy: sylvain.laur...@gmail.com


In the doc for the RemoteIpValve
(http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html), the remoteIPHeader
attribute is mentionned, but actually it should be remoteIpHeader (notice the
lowercase "p") since the setter method is setRemoteIpHeader(..).

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49436] Cannot use JMX to save changes to tomcat-users.xml

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49436

David Tugby  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #2 from David Tugby  2010-06-15 07:39:48 EDT 
---
Thanks. 

Got this working by pasting the entire entry from
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#UserDatabase%20Resources
into my server.xml file. So I must have entered a typo when I tried earlier.

The documentation is not quite correct however.
tomcat-6.0-doc/jndi-resources-howto.html states
"The readonly attribute is optional and defaults to false if not supplied."

In my humble opionion this should be changed to:
"The readonly attribute is optional and defaults to true if not supplied."

Thanks again for the prompt response.

David Tugby

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Some general questions about tomcat instead of GlassFish

2010-06-15 Thread jjjjj jjjjjj
Hello 
 
Dear chris
-I edited my name on server

-Thank you for your responding but please say some thing more about maven
who must use maven?
how must use maven?
Is maven same with CVS or SVN?

Regards
Pouya



From: Christopher Schultz 
To: Tomcat Developers List 
Sent: Tue, June 15, 2010 2:53:30 AM
Subject: Re: Some general questions about tomcat instead of GlassFish

Pouya,

On 6/12/2010 12:14 PM, j jj wrote:
>

Please use a semi-legitimate name when posting to the list: this should
be easy to configure in your email reader. Also, there's no need to put
underscores_between_your_words_in_the_subject, as this is not some kind
of wiki.

> Would you please tell me that we can use tomcat instead of GlassFish or 
> no?(Yes/No Why?)

Deciding between Tomcat and Glassfish is really a matter of application
requirements: GlassFish is a full J2EE server, while Tomcat is limited
to a Java servlet container/web server. GlassFish actually uses Tomcat
internally as its servlet container and web server, and adds features to it.

If you only need a servlet container and web server, Tomcat can meet
your needs. If you need additional services provided by a J2EE server
(EJB, JMX, etc.) then you'll want GlassFish.

> Which of JSF or Struts is more compatible with tomcat?

Both are equally compatible.

> Please say to me something about maven,Is this a project management table or 
> no ,What is this ?

Maven is a build tool. Whether Tomcat has been mavenized shouldn't be
relevant if you are developing web applications for deployment onto Tomcat.

-chris



  

[OT] Re: Some general questions about tomcat instead of GlassFish

2010-06-15 Thread Pid
On 15/06/2010 13:29, j jj wrote:
> Hello 
>  
> Dear chris
> -I edited my name on server

Apparently not, see above.

> -Thank you for your responding but please say some thing more about maven
> who must use maven?
> how must use maven?
> Is maven same with CVS or SVN?

Wrong mailing list for that question.  Try here:

 http://maven.apache.org/


p


> Regards
> Pouya
> 
> 
> 
> From: Christopher Schultz 
> To: Tomcat Developers List 
> Sent: Tue, June 15, 2010 2:53:30 AM
> Subject: Re: Some general questions about tomcat instead of GlassFish
> 
> Pouya,
> 
> On 6/12/2010 12:14 PM, j jj wrote:
>>
> 
> Please use a semi-legitimate name when posting to the list: this should
> be easy to configure in your email reader. Also, there's no need to put
> underscores_between_your_words_in_the_subject, as this is not some kind
> of wiki.
> 
>> Would you please tell me that we can use tomcat instead of GlassFish or 
>> no?(Yes/No Why?)
> 
> Deciding between Tomcat and Glassfish is really a matter of application
> requirements: GlassFish is a full J2EE server, while Tomcat is limited
> to a Java servlet container/web server. GlassFish actually uses Tomcat
> internally as its servlet container and web server, and adds features to it.
> 
> If you only need a servlet container and web server, Tomcat can meet
> your needs. If you need additional services provided by a J2EE server
> (EJB, JMX, etc.) then you'll want GlassFish.
> 
>> Which of JSF or Struts is more compatible with tomcat?
> 
> Both are equally compatible.
> 
>> Please say to me something about maven,Is this a project management table or 
>> no ,What is this ?
> 
> Maven is a build tool. Whether Tomcat has been mavenized shouldn't be
> relevant if you are developing web applications for deployment onto Tomcat.
> 
> -chris
> 
> 
> 
>   




signature.asc
Description: OpenPGP digital signature


Re: [OT] Re: Some general questions about tomcat instead of GlassFish

2010-06-15 Thread jjjjj jjjjjj
Hi pid
My name take affect after resign
but i found chris that knows things about maven and for this reason i asked 
them from chris or  people like chris that can, but use maven mailing list is 
better

than you 
-pouya




From: Pid 
To: Tomcat Developers List 
Sent: Tue, June 15, 2010 5:11:44 PM
Subject: [OT] Re: Some general questions about tomcat instead of GlassFish

On 15/06/2010 13:29, j jj wrote:
> Hello 
>  
> Dear chris
> -I edited my name on server

Apparently not, see above.

> -Thank you for your responding but please say some thing more about maven
> who must use maven?
> how must use maven?
> Is maven same with CVS or SVN?

Wrong mailing list for that question.  Try here:

http://maven.apache.org/


p


> Regards
> Pouya
> 
> 
> 
> From: Christopher Schultz 
> To: Tomcat Developers List 
> Sent: Tue, June 15, 2010 2:53:30 AM
> Subject: Re: Some general questions about tomcat instead of GlassFish
> 
> Pouya,
> 
> On 6/12/2010 12:14 PM, j jj wrote:
>>
> 
> Please use a semi-legitimate name when posting to the list: this should
> be easy to configure in your email reader. Also, there's no need to put
> underscores_between_your_words_in_the_subject, as this is not some kind
> of wiki.
> 
>> Would you please tell me that we can use tomcat instead of GlassFish or 
>> no?(Yes/No Why?)
> 
> Deciding between Tomcat and Glassfish is really a matter of application
> requirements: GlassFish is a full J2EE server, while Tomcat is limited
> to a Java servlet container/web server. GlassFish actually uses Tomcat
> internally as its servlet container and web server, and adds features to it.
> 
> If you only need a servlet container and web server, Tomcat can meet
> your needs. If you need additional services provided by a J2EE server
> (EJB, JMX, etc.) then you'll want GlassFish.
> 
>> Which of JSF or Struts is more compatible with tomcat?
> 
> Both are equally compatible.
> 
>> Please say to me something about maven,Is this a project management table or 
>> no ,What is this ?
> 
> Maven is a build tool. Whether Tomcat has been mavenized shouldn't be
> relevant if you are developing web applications for deployment onto Tomcat.
> 
> -chris
> 
> 
> 
>  


  

ConcurrentCache atomicity violation

2010-06-15 Thread Ohad Shacham
Hi,



We are writing a tool to detect atomicity violations in usage of
ConcurrentHashMap.

We have run the tool that reported an atomicity violation in functions get
and put of class ConcurrentCache.

The following code shows the put function of the ConcurrentCache:



public void put(K k, V v) {

if (this.eden.size() >= size) {

this.longterm.putAll(this.eden);

this.eden.clear();

}

this.eden.put(k, v);

}



In this code the tool discovered a scenario that a (k,v) pair is added to
eden and a clear operation deletes this pair without copying it to the
longterm hash.

We would be happy if you can let us know if this is a bug or this is a valid
behavior of the cache.

Another problem is that longterm is a WeakHashMap which is not a thread safe
implementation.



Thanks,

Ohad


Embedded Tomcat - programatically adding context-params

2010-06-15 Thread Afkham Azeez
Hi folks,
We are using Embedded Tomcat in our products. Once we create a new context,
we need to set some context parameters. How can this be done?

I've tried using org.apache.catalina.Context#addParameter, but from within a
JSP, when I try to access this parameter as
application.getInitParameter("name) I'm getting null.

Thanks
Azeez


Re: Embedded Tomcat - programatically adding context-params

2010-06-15 Thread Afkham Azeez
Sorted this out.

You need to set the params after the context is added to the host. I was
setting it before adding it to the host.

Thanks
Azeez

On Tue, Jun 15, 2010 at 8:07 PM, Afkham Azeez  wrote:

> Hi folks,
> We are using Embedded Tomcat in our products. Once we create a new context,
> we need to set some context parameters. How can this be done?
>
> I've tried using org.apache.catalina.Context#addParameter, but from within
> a JSP, when I try to access this parameter as
> application.getInitParameter("name) I'm getting null.
>
> Thanks
> Azeez
>



-- 
Afkham Azeez
Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
email: az...@wso2.com cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware


[Tomcat Wiki] Update of "TomcatHibernate" by MarkEggers

2010-06-15 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "TomcatHibernate" page has been changed by MarkEggers.
http://wiki.apache.org/tomcat/TomcatHibernate?action=diff&rev1=1&rev2=2

--

  }}}
  Note that jdbc/sakila matches the web.xml resource-ref-name, which matches 
the name attribute in context.xml. java:comp/env/ is the namespace to look up 
the jdbc reference.
  
- No other connection or pooling information should be present in your 
hibernate.cfg.xml file.
+ No other connection or pooling information should be present in your 
hibernate.cfg.xml file. Note, you still need the '''database dialect''' 
properties in order for Hibernate to function.
  
  If you are using Netbeans as your IDE, the hibernate.cfg.xml file will be 
found in /src/java by default.
  

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat 7.0.0 as beta

2010-06-15 Thread Martin Dubuc
On Mon, Jun 14, 2010 at 5:30 PM, Mark Thomas  wrote:

> On 14/06/2010 14:27, Martin Dubuc wrote:
>
>> I have been running RC4 for a couple of days and it seems to be fairly
>> stable. I would recommend release it as 7.0.0 Beta.
>>
>> However, there is an issue with the el. It can't deal with literals, which
>> will be a problem for all applications using JSF converters. There was a
>> similar issue when Tomcat 6.0.2. came out. You can go back in the mailing
>> list archive read message in tomcat-dev Nov. 29, 2006 16:39:21 GMT and
>> titled "Problem with JSF 1.2 converters in Tomcat 6.0.2":
>>
>> http://marc.info/?l=tomcat-dev&m=116482838430229&w=2
>>
>
> Thanks for the report. The issue has been fixed.
>
>
This is great news. Thanks for addressing this issue. Looking forward to see
the next Tomcat load.


>
>  I sent a message to Rémy, who handled that issue back then, but haven't
>> got
>> news back from him.
>>
>
> I can't speak for Remy but private messages to developers tend to get
> ignored. The rule for Tomcat - as it is for all ASF projects - is if it
> didn't happen on the mailing list then it never happened. Issues should not
> be raised directly with individual committers but with the community as a
> whole either directly on the dev list or better still as a Bugzilla entry.
>
>
>
OK. Next time I'll send the message to the list directly.


>  I know we discussed el licensing a while back on the list. Hopefully it
>> will
>> not be a problem modifying that code.
>>
>
> Huh? I have no idea what you are referring to here. Tomcat's EL
> implementation is - and always has been - ALv2 licensed.
>
>
>
I confused the EL with the BCEL. Never mind.


> Mark
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


tomcat native - SSL setBIO()

2010-06-15 Thread Costin Manolache
Hi,

There are some methods in SSLContext to create and use a new BIO. Are there
any examples/tests for this ? I can't find how to attach the BIO to a
socket, it seems SSL_set_bio is never called, can't figure what
SSLContext.setBIO() does.

Costin


DO NOT REPLY [Bug 49444] New: Lots of 0.0.0.0:PORT opened by tomcat for a single request

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49444

   Summary: Lots of 0.0.0.0:PORT opened by tomcat for a single
request
   Product: Tomcat 5
   Version: 5.5.28
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Unknown
AssignedTo: dev@tomcat.apache.org
ReportedBy: sandip.val...@gmail.com


Tomcat is opening below ports for a single request, 7176 is the PID for tomcat.

TCP0.0.0.0:4258   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4260   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4262   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4263   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4265   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4267   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4270   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4271   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4273   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4274   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4276   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4277   0.0.0.0:0  LISTENING   7176
TCP0.0.0.0:4282   0.0.0.0:0  LISTENING   7176

If I submit same request multiple times it cause below error. Because of
thousands of port opened by tomcat.

 Network error IOException: No buffer space available (maximum connections
reached?): connect

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 49444] Lots of 0.0.0.0:PORT opened by tomcat for a single request

2010-06-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49444

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas  2010-06-15 19:36:37 EDT ---
Bugzilla is not a support forum. Please use the users mailing list for
assistance.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "HowTo" by MarkEggers

2010-06-15 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "HowTo" page has been changed by MarkEggers.
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=92&rev2=93

--

  == How do I set up Tomcat virtual hosts in a development environment? ==
  See TomcatDevelopmentVirtualHosts
  
+ == How do I use DataSourceRealms for authentication and authorization? ==
+ See TomcatDataSourceRealms
+ 
  
  [[CategoryFAQ]]
  

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "TomcatDataSourceRealms" by Mar kEggers

2010-06-15 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "TomcatDataSourceRealms" page has been changed by MarkEggers.
http://wiki.apache.org/tomcat/TomcatDataSourceRealms

--

New page:
= Tomcat DataSource Realms =
== Introduction ==
Useful information for configuring Tomcat !DataSourceRealms is spread out over 
three documents. This often leads to people using a simple JDBCRealm for 
authentication and authorization. There are at least two challenges when using 
a simple JDBCRealm for this purpose.

 1. High degree of synchronization can lead to poor performance on high volume 
sites
 1. Database connection timeouts on low volume sites can lead authentication 
failure

The Tomcat !DataSource realm addresses these issues by using a JNDI datasource. 
The realm can be configured with adequate pooling parameters to reduce 
synchronization issues, and a validationQuery to prevent database connection 
timeouts.

This document takes information from three Tomcat documents to  describe some 
ways to configure !DataSource Realms for authorization and authentication.

== Environments ==
The following two environments are used while writing this document.
||Component 
||Version ||
||OS ||Fedora 13 32 bit ||
||JDK/JRE ||1.6.0_20 ||
||Tomcat ||6.0.26 ||
||Apache Derby ||10.5.3.0 ||
||IDE ||!NetBeans 6.8 ||
||Hibernate ||3.2.5 ga ||
||JSF ||1.2 ||
|| || ||
||OS ||Windows/XP Professional SP 4 32 bit ||
||JDK/JRE ||1.6.0_20 ||
||Tomcat ||6.0.26 ||
||Apache Derby ||5.1.31 ||
||IDE ||!NetBeans 6.8 ||
||Hibernate ||10.5.3.0 ||
||JSF ||1.2 ||




In order to test these configurations, a simple JSF / Hibernate / CRUD 
application based on the the following 
[[http://netbeans.org/kb/docs/web/hibernate-jpa.html|NetBeans JSF Tutorial]] 
was used. The entire application was wrapped up in a BASIC authentication 
scheme using the following web.xml portion.

{{{

Entire application

Everything
coarse grained approach
/faces/*



user



BASIC
Hibernate Application


generic user of application
user

}}}
Finally, a separate authorization and authentication database was created in 
Apache Derby. This database consists of three tables and one view.

 1. USERS table with USERNAME and PASSWORD columns
 1. ROLES table with ROLENAME and DESCRIPTION columns
 1. ASSIGN table
  1. foreign keys for USERNAME and ROLENAME from the USERS and ROLES tables
  1. STATE column for active and inactive assignments
 1. AUTH view with USERNAME and ROLENAME
  1. joined on USERS and USERNAME
  1. joined on ROLES and ROLENAME
  1. conditional on ASSIGN.STATE being active

== Overview ==
The !DataSource realm actually consists of two components.

The first component is a JNDI JDBC data source resource. Documentation for 
setting this up can be found here:

 * 
[[http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC%20Data%20Sources|JDBC
 Data Sources]]

=== IMPORTANT NOTE ===
Using a JNDI JDBC data source resource requires the JDBC driver to be visible 
to Tomcat. Thus, the JDBC driver needs to be placed in $CATALINA_HOME/lib (for 
Tomcat 6). Once this is done, '''do not put this driver in the application's 
WEB-INF/lib directory'''.

The second component is the actual Realm. Documentation for setting this up can 
be found in the following locations:

 * [[http://tomcat.apache.org/tomcat-6.0-doc/config/realm.html|Realm Component]]
 * 
[[http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#DataSourceRealm|DataSource
 Realm]]

In particular, pay attention to the table and column mappngs required for the 
!DataSource realm. Combining this information leads to a working !DataSource 
realm for authentication and authorization.

= Three Scenarios =
Three configuration scenarios are presented below.

 * Everything in META-INF/context.xml which provides an application - specific 
configuration
 * !GlobalNamingResources and META-INF/context.xml which provides for multiple 
applications selectively using authentication
 * Everything in $CATALINA_HOME/conf/server.xml which provides a global Host or 
Engine configuration

== Everything in META-INF/context.xml ==
This is appropriate when each web application might use different 
authentication and authorization databases. This is also the simplest 
configuration to manage, since all configuration elements are in one location. 
Finally, this configuration will produce the most portable (between Tomcat 
installations) war file.

=== Resource Element ===
A Resource element is created in META-INF/context.xml to describe the database 
connection and provide a JNDI name. This is the same type of Resource 
description that is used for application - level JNDI data source. A sample 
fragment is shown below.

{{{

}}}
This Resource element descri

Re: tomcat native - SSL setBIO()

2010-06-15 Thread Mladen Turk

On 06/16/2010 12:34 AM, Costin Manolache wrote:

Hi,

There are some methods in SSLContext to create and use a new BIO. Are there
any examples/tests for this ? I can't find how to attach the BIO to a
socket, it seems SSL_set_bio is never called, can't figure what
SSLContext.setBIO() does.



I'd suggest you forget about those ;)

SSL BIO allows to write a java code that will SSL use
for read/write to the sockets.
Jean-Frederic created those but cannot tell for what reason.
Probably to allow direct java.sockets via SSL by writing
custom wrapper for SSL Bio (really cannot figure out
why would one wish to go trough 4 JNI callback layers for
making a write, but it's there).
Like you said it wasn't tested, and I was trying to
axe this stuff from version 0.1, but it still hangs there.

Why would you need that?


Regards
--
^TM

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: tomcat native - SSL setBIO()

2010-06-15 Thread jean-frederic clere
On 06/16/2010 07:08 AM, Mladen Turk wrote:
> On 06/16/2010 12:34 AM, Costin Manolache wrote:
>> Hi,
>>
>> There are some methods in SSLContext to create and use a new BIO. Are
>> there
>> any examples/tests for this ? I can't find how to attach the BIO to a
>> socket, it seems SSL_set_bio is never called, can't figure what
>> SSLContext.setBIO() does.
>>
> 
> I'd suggest you forget about those ;)
> 
> SSL BIO allows to write a java code that will SSL use
> for read/write to the sockets.
> Jean-Frederic created those but cannot tell for what reason.

The idea was to use java socket directly to have just the crypto layer
done by SSL but tc-native went another way.

> Probably to allow direct java.sockets via SSL by writing
> custom wrapper for SSL Bio (really cannot figure out
> why would one wish to go trough 4 JNI callback layers for
> making a write, but it's there).
> Like you said it wasn't tested, and I was trying to
> axe this stuff from version 0.1, but it still hangs there.
> 
> Why would you need that?

If not needed we should remove it.

Cheers

Jean-Frederic

> 
> 
> Regards


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org