[JBoss OSGi Development] - Re: Service integration with MC
by alesj
"alesj" wrote : "adrian(a)jboss.org" wrote :
| | The big problem with doing this now is that it would make it difficult to drop the OSGi
| | layer into existing jboss releases since we can't change their MC implementations to do this.
| |
| | There's probably some compromise we can reach between the two extremes
| | and leave the proper solution to a future major release of JBoss.
| |
| I don't understand what the big problem you see is?
|
Ah, scratch this. :-)
Re-reading it once again, and actually using tiny part of the brain that is not asleep yet, helped.
I wouldn't bother with previous releases. Or should we?
As we're already using CL and Deployers snapshots,
I guess we could fix Dependency and Kernel as well, still on the 2.0.x branch, to fit our needs.
In the worst case making new 2.1.x branch, same as we did for VFS and Man,
which could still be part of JBoss 5.x (aka "existing" jboss releases), leaving bigger MC 2.2.x refactorings for 6.x.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252153#4252153
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252153
15 years, 4 months
[JBoss OSGi Development] - Service integration with MC
by alesj
and vice versa.
* Service --> MC
"adrian(a)jboss.org" wrote :
| The service layer is not so well integrated with the MC. It does just enough to
| be "OSGi compliant" (of course that's not yet tested). So this is at the
| moment very simple.
| The OSGiServiceState which should eventually turn into an MC context implementation
| has two "facades", the standard ServiceRegistration and ServiceReference interfaces.
|
* MC --> Service
"adrian(a)jboss.org" wrote :
| Services are also largely complete. What's missing is that we want to expose
| MC pojos and JMX MBeans etc. as OSGi services.
|
| The proper way to do this would be to push the OSGi Filter into kernel project
| and use the MDR INSTANCE scope as the attributes.
| There would be a gotcha in that OSGi expect attributes to have case insensitive names,
| but we would only have to enforce that for OSGi created services.
|
Unless you already started on this, I would like to have a crack at it once I return from JBW.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252151#4252151
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252151
15 years, 4 months
[JBoss Microcontainer Development] - Adding vargargs parameters to getXXXDeclaredXXX methods at J
by flavia.rainone@jboss.com
This post is related to issue JBREFLECT-53.
As result of implementing JBREFLECT-53, I noticed that MutableClassInfo now has two similar getDeclaredMethod methods:
| MutableMethodInfo getDeclaredMethod(String name, TypeInfo... parameters);
| MutableMethodInfo getDeclaredMethod(String name, String... parameters)
|
Now, if I try to call getDeclaredMethod with one parameter like the piece of code below:
MutableClassInfo mci = ....
| mci.getDeclaredMethod("bar");
I get the error:
The method getDeclaredMethod(String, TypeInfo[]) is ambiguous for the type MutableClassInfo
So, this forces us to use getDeclaredMethod with a minimum of two parameters, taking away some of the advantage of having a signature with vargars:
mci.getDeclaredMethod("bar", new TypeInfo[0]);
Would it be all right if I added a third method to MutableClassInfo (see below), so I can get rid of the problem?
MutableMethodInfo getDeclaredMethod(String name)
My main concern is whether there could be other classes outside of JBoss Reflection project implementing MutableClassInfo interface.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252133#4252133
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252133
15 years, 4 months
[JBoss Microcontainer Development] - Re: New ClassPool sub-project; structure
by flavia.rainone@jboss.com
Ales,
I think I have solved the protected constructor issue the best I could, using common sense.
Could you please take a look at the current package structure of the class pool project?
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-classpool/trunk/src...
I have placed only 4 classes in the spi:
- AbstractClassPool: an abstract subclass of javassist.scopedpool.ScopedClassPool that is super class common to all classpool subclasses in the project
- AbstractClassPoolFactory: an implementation of javassist.scopedpool.ScopedClassPoolFactory that is the super class of all classpoolfactories in the project
- ClassPoolRepository: extends javassist.scopedpool.ScopedClassPoolRepository and contains the entry point of the project:
| ClassPool ClassPoolRepository.registerClassLoader(ClassLoader)
|
In order to use the repository, you must first configure the factory by calling
| ClassPoolRepository.setClassPoolFactory(ScopedClassPoolFactory factory)
|
It is at this point where you decide which one of the several factories you want to use.
- ClassPoolRepositoryCallback: a callback interface so you can be notified when a classloader is registered and unregistered
Now, according to your classification:
anonymous wrote : spi - functional split of the actual module architecture
|
| e.g. see MC's Dependency module in Kernel sub-project.
|
| The spi pieces are Controller, ControllerContext, DependencyInfo, DependencyItem, ...
| Where the impl is AbstractController, AbstractControllerContext, ...
| Where everything external (and even internal) should simply "talk" to spi, meaning the actual impl can be changed at any time.
|
| api - what users can "touch"
|
I think I should create an api package containing:
- ClassPoolRepository
- ClassPoolRepositoryCallback
And, then, AbstractClassPool and AbstsractClassPoolFactory would the spi. What do you think?
Or, maybe, when you say "functional split of the actual module architecture", you would like to include more classes, such as the classes that are currently part of org.jboss.classpool.base package?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252130#4252130
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252130
15 years, 4 months