users@glassfish.java.net

RE: Servcies registered with OSGi bundle context NOT available via JNDI

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sun, 16 May 2010 09:06:38 -0400

do you see OSGI entries in domain.xml

 

        <!-- Configuration of various third-party OSGi bundles like
             Felix Remote Shell, FileInstall, etc. -->


        <!-- Port on which remote shell listens for connections.-->
        <jvm-options>-Dosgi.shell.telnet.port=%%%OSGI_SHELL_TELNET_PORT%%%</jvm-options>


        <!-- How many concurrent users can connect to this remote shell -->
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>


        <!-- From which hosts users can connect -->
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>


        <!-- Directory being watched by fileinstall. -->
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>


        <!-- Time period fileinstaller thread in ms. -->
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>


        <!-- debug level -->
        <jvm-options>-Dfelix.fileinstall.debug=1</jvm-options>
        <!-- should new bundles be started or installed only?
             true => start, false => only install
        -->


        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <!-- End of OSGi bundle configurations -->
        <jvm-options>-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>


?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Sat, 15 May 2010 19:49:59 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Servcies registered with OSGi bundle context NOT available via JNDI
>
> From everything I have read on the web, when I register a service using the BundleContext.registerService() in a BundleActivator.start() method, in an OSGi bundle deployed to a glassfish server (I'm using v3.0.1b18), the service is supposed to be registered in JNDI so that I can use resource injection in a servlet (via @Resource). In fact, it seems that the services are NOT being registered in JNDI (as the name lookup fails, and browsing the JNDI tree confirms). If I register the services manually, then the @Resource injection works as it should.
>
> Is this a bug or do I need some special OSGi module installed to realize this behavior? Does this ONLY happen when using declarative services or spring? Shouldn't it work with manual registrations too?
>
> See http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_3 and http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_4
>
> Thanks in advance.
> [Message sent by forum member 'npahucki']
>
> http://forums.java.net/jive/thread.jspa?messageID=469987
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2