users@glassfish.java.net

RE: relationship between application classloader and osgi module classloader

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 22 Nov 2012 19:40:53 -0500


I assume you want to have the Glassfish Application Server felix container startup routines to pickup your newly minted OSGI jar?http://java.dzone.com/news/from-osgi-glassfish-5-steps

Martin Gainty
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

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.

 Subject: relationship between application classloader and osgi module classloader
From: zhaoshanctgu.cn_at_163.com
To: users_at_glassfish.java.net
Date: Wed, 21 Nov 2012 16:32:12 +0000

Hi everyone: I'm now using GlassFish 3.1.2.2 OpenSource Edition, I want to know the relationship between application classloader and osgi module classloader. The application ClassLoader is used to loading ear or war archive deployed in server. The osgi moudle classLoader is used to load jars in folder ${install_dir}/glassfish/modules. In other words , how the osgi module based web container or ejb container communicate with the application deployed in it. I have read the documents on http://docs.oracle.com/cd/E19226-01/820-7695/6niugesfp/index.html , but I'm not sure what classloader is used to load the modules. I debuged The glassfish source code ,I found that the APIClassLoader has a field named apiModuleLoader, It has a same parent classLoader with the bundleClassLoader。The bundleClassLoader is used to load modules.I want to konw this is right or not? If that's right, how the container communicate with he application in it? I’m very confusing.
Does anyone knows something about that? If you konw ,please help me or tell me more information. I would greatly appreciate your answer.
Wish you all the best. Thank you very much! friend using glaafish