GithubHelp home page GithubHelp logo

[JNDI] Services Specification issues about design HOT 1 OPEN

osgi avatar osgi commented on June 1, 2024
[JNDI] Services Specification issues

from design.

Comments (1)

bjhargrave avatar bjhargrave commented on June 1, 2024

Comment author: Ivan Dubrov <[email protected]>

The full issue in question is at https://mail.osgi.org/pipermail/osgi-dev/2010-September/002638.html

Sometimes JNDI provider calls getObjectInstance providing "resolved"
object (not a reference, javax.naming.Reference), for example instance
of JMS javax.jms.ConnectionFactory. According to the 126.4/6 [1], my
implementation of JNDIProviderAdmin tries to convert object with all
possible factories. The problem is that most JBoss factories expect
object passed to be javax.naming.Reference, so ClassCastException is
thrown. According to the specification (see the end of the 126.4 [2]),
the exception must be propagated to the caller, breaking the JNDI
resolution.

[1] Snippet from the OSGi Service Platform Release 4, Enterprise
Specification 4.2, section 126.4/6:

If the description was a Reference and without a factory class name
specified, or if the description was not of type Reference, then
attempt to convert the object with each Object Factory service (or Dir
Object Factory service for directories) service in ranking order until a
non-null value is returned.

[2] Exceptions handling:

If an Exception occurs during the use of an Object Factory Builder
service then this exception should be logged but must be ignored. If,
however, an Exception occurs during the calling of a found ObjectFactory
or DirObjecFactory object then this Exception must be re-thrown to the
caller of the JNDI Provider Admin service
.

To sum up:

Faulty ObjectFactory can break JNDI resolution completely, even when client tries to resolve completely valid references implemented by different provider.

from design.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.