<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/tyrex/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/tyrex/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 10 Sep 2004 08:30:55 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tyrex/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>Allow building with SDK 1.4 (add JDBC3 methods)</title><link>https://sourceforge.net/p/tyrex/patches/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This patch allow building Tyrex 1.0.1 with Java 1.4 by&lt;br /&gt;
adding the missing JDBC3 methods.  They mostly return&lt;br /&gt;
an Exception ("Unimplemented").&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 10 Sep 2004 08:30:55 -0000</pubDate><guid>https://sourceforge.netada4f39d0ded11e97a63b77b9f0f8e24c4c24434</guid></item><item><title>JNDI Reference handling during lookup behavior</title><link>https://sourceforge.net/p/tyrex/patches/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I recently have been working with Tyrex's MemoryContext&lt;br /&gt;
as a stub JNDI provider in my application, and have&lt;br /&gt;
found that it doesn't follow the behavior of the Tomcat&lt;br /&gt;
JNDI provider (quite probably other JNDI providers as&lt;br /&gt;
well).&lt;/p&gt;
&lt;p&gt;What is happening is, on every lookup of a DataSource&lt;br /&gt;
that is bound in JNDI via a Reference, the data source&lt;br /&gt;
is created, returned to the caller and then immediately&lt;br /&gt;
discarded. The DataSource then gets garbage collected,&lt;br /&gt;
and closes its resources in the finalizer, which closes&lt;br /&gt;
the open connections that the application code is using&lt;br /&gt;
aburptly and asynchronously.&lt;/p&gt;
&lt;p&gt;In order to implement a connection pool, the pool must&lt;br /&gt;
stay referenced in memory across JNDI invocations. The&lt;br /&gt;
way tomcat does this is on the first lookup, it&lt;br /&gt;
clobbers the Reference entry it has stored and replaces&lt;br /&gt;
it with the object that it referred to. This keeps the&lt;br /&gt;
pool alive for the duration of the life of the JNDI&lt;br /&gt;
provider.&lt;/p&gt;
&lt;p&gt;The attached patch does this to the Tyrex&lt;br /&gt;
MemoryContext. The diff is against the head of CVS, and&lt;br /&gt;
has been tested fairly extensively and shown to work&lt;br /&gt;
correctly.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kris wehner</dc:creator><pubDate>Thu, 02 Sep 2004 19:41:16 -0000</pubDate><guid>https://sourceforge.net2e4cc31c0e92d3723a84377d5befd2c341008412</guid></item><item><title>Handling of References broken?</title><link>https://sourceforge.net/p/tyrex/patches/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;1. I tried to incorporate the tyrex JNDI Provider into my Client &lt;br /&gt;
Container &lt;br /&gt;
and found some bug(s) in the MemoryContext regarding &lt;br /&gt;
ReferenceHandling. &lt;br /&gt;
I'm using my own ThreadLocalContextFactory and my own &lt;br /&gt;
(read/write) &lt;br /&gt;
JavaContext and javaURLContextFactory .. &lt;/p&gt;
&lt;p&gt;RefAddr refAddr = new StringRefAddr(&amp;amp;quot;nns&amp;amp;quot;, &amp;amp;quot;ENC&amp;amp;quot;); &lt;br /&gt;
Reference envRef = new Reference(&amp;amp;quot;javax.naming.Context&amp;amp;quot;, &lt;br /&gt;
refAddr, &lt;br /&gt;
ThreadLocalContextFactory.class.getName(), &lt;br /&gt;
null); &lt;br /&gt;
Context context = (Context)new InitialContext().lookup(&amp;amp;quot;java:&amp;amp;quot;); &lt;br /&gt;
context.bind(&amp;amp;quot;comp&amp;amp;quot;, envRef); &lt;/p&gt;
&lt;p&gt;Thus &amp;amp;quot;java:comp&amp;amp;quot; is a dynamic reference to a thread local context. &lt;/p&gt;
&lt;p&gt;The following code is working: &lt;/p&gt;
&lt;p&gt;Context subcontext = (Context)context.lookup(&amp;amp;quot;comp&amp;amp;quot;); &lt;br /&gt;
subcontext.bind(&amp;amp;quot;test&amp;amp;quot;, &amp;amp;quot;value&amp;amp;quot;); &lt;/p&gt;
&lt;p&gt;is working. However, the following results in a &lt;br /&gt;
NotContextException: &amp;amp;quot;comp &lt;br /&gt;
is not a subcontext&amp;amp;quot;: &lt;/p&gt;
&lt;p&gt;context.bind(&amp;amp;quot;comp/test&amp;amp;quot;, &amp;amp;quot;value&amp;amp;quot;); &lt;/p&gt;
&lt;p&gt;.. well, he's right, but it's a Reference to a subcontext!! &lt;/p&gt;
&lt;p&gt;The problem is, that References are only followed during lookups. If &lt;br /&gt;
bind/rebind/list/.. are called with a name that traverses a Reference, &lt;br /&gt;
the &lt;br /&gt;
reference is not followed. &lt;/p&gt;
&lt;p&gt;The attached patch fixes this (at least for me). But I'm not sure, if it &lt;br /&gt;
fixes all places, where references have to be followed. Also LinkRefs &lt;br /&gt;
are &lt;br /&gt;
not handled. &lt;/p&gt;
&lt;p&gt;2. another suggestion (also part of the patch): Please make the &lt;br /&gt;
constructor: &lt;/p&gt;
&lt;p&gt;MemoryContext( MemoryBinding bindings, Hashtable env ) &lt;/p&gt;
&lt;p&gt;public or at least protected to make the MemoryContext more &lt;br /&gt;
accessible and &lt;br /&gt;
useful for different applications. &lt;/p&gt;
&lt;p&gt;3. Please separate the JNDI provider from the rest of the tyrex jar. &lt;br /&gt;
The &lt;br /&gt;
class dependencies &amp;amp;quot;leak&amp;amp;quot;: &lt;/p&gt;
&lt;p&gt;javaURLContextFactory depends on JavaContext &lt;br /&gt;
JavaContext           depends on EnvContext &lt;br /&gt;
EnvContext            depends on tyrex.tm.impl.ThreadContext &lt;br /&gt;
ThreadContext         depends on tyrex.tm.RuntimeContext &lt;br /&gt;
RuntimeContext depends on everything else &lt;/p&gt;
&lt;p&gt;This means, that the java url context factory can only be used in &lt;br /&gt;
conjunction with the whole tyrex functionality. &lt;/p&gt;
&lt;p&gt;A possible solution would be to use a provider mechanism: a &lt;br /&gt;
configurable &lt;br /&gt;
ObjectFactory implementation, that populates the EnvContext. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Holger Engels</dc:creator><pubDate>Wed, 12 Jun 2002 06:09:20 -0000</pubDate><guid>https://sourceforge.net1b9702341dc90ef6d5b893ac93fc7d2926893fa2</guid></item></channel></rss>