You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Christian Haul (JIRA)" <ji...@apache.org> on 2008/12/20 11:42:44 UTC
[jira] Created: (GERONIMO-4477) JNDI NameClassPair always returns
isRelative() = false
JNDI NameClassPair always returns isRelative() = false
------------------------------------------------------
Key: GERONIMO-4477
URL: https://issues.apache.org/jira/browse/GERONIMO-4477
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Affects Versions: 2.1.3
Environment: Windows XP, Sun JDK 1.5.0
Reporter: Christian Haul
Priority: Trivial
When traversing the JNDI tree e.g. in a servlet, the returned NameClassPairs always return "false" for a call on isRelative(). Which is especially astonishing since the debugger shows an internal state of "true" for the property isRelative. Unfortunately I don't have the source in question as it doesn't seem to be in the geronimo source archive.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-4477) JNDI NameClassPair always returns
isRelative() = false
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658306#action_12658306 ]
David Jencks commented on GERONIMO-4477:
----------------------------------------
The relevant source is at https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-naming
It would be great if you could open an issue under xbean jira https://issues.apache.org/jira/browse/XBEAN
The NameClassPair is constructed in ContextUtil.ListEnumeration...
{code}
public NameClassPair nextElement() {
Map.Entry entry = (Map.Entry) iterator.next();
String name = (String) entry.getKey();
Object value = entry.getValue();
String className;
if (value instanceof Reference) {
Reference reference = (Reference) value;
className = reference.getClassName();
} else {
className = value.getClass().getName();
}
return new NameClassPair(name, className);
}
{code}
I find the javadoc for this method less than enlightening. Should we just be calling the constructor NameClassPair(name, className, true)?
> JNDI NameClassPair always returns isRelative() = false
> ------------------------------------------------------
>
> Key: GERONIMO-4477
> URL: https://issues.apache.org/jira/browse/GERONIMO-4477
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.3
> Environment: Windows XP, Sun JDK 1.5.0
> Reporter: Christian Haul
> Priority: Trivial
>
> When traversing the JNDI tree e.g. in a servlet, the returned NameClassPairs always return "false" for a call on isRelative(). Which is especially astonishing since the debugger shows an internal state of "true" for the property isRelative. Unfortunately I don't have the source in question as it doesn't seem to be in the geronimo source archive.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (GERONIMO-4477) JNDI NameClassPair
always returns isRelative() = false
Posted by "Christian Haul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658582#action_12658582 ]
haul@informatik.tu-darmstadt.de edited comment on GERONIMO-4477 at 12/22/08 8:39 AM:
--------------------------------------------------------------------
Hi David,
thanks for your quick response. I will follow up on the XBEAN tracker.
However, with the source you pointed to, the issue is clear:
I do a
{code}
NamingEnumeration<Binding> namingEnum = context.listBindings("");
while (namingEnum.hasMore()) {
Binding nameClassPair = namingEnum.nextElement();
if (nameClassPair.isRelative()) {
....
{code}
and I get a ContextUtil$ReadOnlyBinding. That class has a very simple isRelative() method:
{code}
public boolean isRelative() {
return false;
}
{code}
:-)
was (Author: haul@informatik.tu-darmstadt.de):
Hi David,
thanks for your quick response. I will follow up on the XBEAN tracker.
However, with the source you pointed to, the issue is clear:
I do a
NamingEnumeration<Binding> namingEnum = context.listBindings("");
while (namingEnum.hasMore()) {
Binding nameClassPair = namingEnum.nextElement();
if (nameClassPair.isRelative()) {
....
and I get a ContextUtil$ReadOnlyBinding. That class has a very simple isRelative() method:
public boolean isRelative() {
return false;
}
:-)
> JNDI NameClassPair always returns isRelative() = false
> ------------------------------------------------------
>
> Key: GERONIMO-4477
> URL: https://issues.apache.org/jira/browse/GERONIMO-4477
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.3
> Environment: Windows XP, Sun JDK 1.5.0
> Reporter: Christian Haul
> Priority: Trivial
>
> When traversing the JNDI tree e.g. in a servlet, the returned NameClassPairs always return "false" for a call on isRelative(). Which is especially astonishing since the debugger shows an internal state of "true" for the property isRelative. Unfortunately I don't have the source in question as it doesn't seem to be in the geronimo source archive.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (GERONIMO-4477) JNDI NameClassPair always returns
isRelative() = false
Posted by "Christian Haul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658582#action_12658582 ]
Christian Haul commented on GERONIMO-4477:
------------------------------------------
Hi David,
thanks for your quick response. I will follow up on the XBEAN tracker.
However, with the source you pointed to, the issue is clear:
I do a
NamingEnumeration<Binding> namingEnum = context.listBindings("");
while (namingEnum.hasMore()) {
Binding nameClassPair = namingEnum.nextElement();
if (nameClassPair.isRelative()) {
....
and I get a ContextUtil$ReadOnlyBinding. That class has a very simple isRelative() method:
public boolean isRelative() {
return false;
}
:-)
> JNDI NameClassPair always returns isRelative() = false
> ------------------------------------------------------
>
> Key: GERONIMO-4477
> URL: https://issues.apache.org/jira/browse/GERONIMO-4477
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.3
> Environment: Windows XP, Sun JDK 1.5.0
> Reporter: Christian Haul
> Priority: Trivial
>
> When traversing the JNDI tree e.g. in a servlet, the returned NameClassPairs always return "false" for a call on isRelative(). Which is especially astonishing since the debugger shows an internal state of "true" for the property isRelative. Unfortunately I don't have the source in question as it doesn't seem to be in the geronimo source archive.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.