[Design the new POJO MicroContainer] - Re: WiredMicrocontainerTest
by adrian@jboss.org
"alesj" wrote : "adrian(a)jboss.org" wrote : Either add the feature to the MicrocontainerTest class or move it to src/tests
| I don't want all the tests to be autowired.
| But on the other hand this is a generic MC test util, so imho it should be where it is.
| As a user I don't want to pull all the kernel tests just to get what the kernel module is all about, this test. :-)
MicrocontainerTest is the exported test. I don't want lots of different test parents
with the N<->M problem for different features.
I already went through and fixed this once and combined three or four classes
you'd created in the package back into the main test class. :-)
There's a previous thread about it somewhere?
The correct way to do this, if you want subclasses to use it is to allow it to be
enabled with something like:
| public MyTest(String name)
| {
| super(name);
| // or whatever you want to call the property
| setRegisterTestInController(true);
| }
|
The same goes for any other features you think are generic enough
to be used elsewhere.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134209#4134209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134209
18 years, 1 month
[Design the new POJO MicroContainer] - Re: Wildcards and JBossXb Builder
by adrian@jboss.org
"alesj" wrote : "adrian(a)jboss.org" wrote :
| | The fix is for you to learn xsd, XSD 1.0.1 :-)
| |
| Looks like not that I'll only learn, I'll have to make a whole degree out of it.
| I though JBossXB Builder was here to relieve the xsd pain, but it's turning to be the other way around ... :-)
|
No. The port to JBossXBBuilder has just caught the fact that you didn't do
the original work correctly ;-)
It's like what I found when I really tested the javabean constructor stuff
from the container project (see other thread with the jira issue :-)
"adrian(a)jboss.org" wrote :
| i.e. we create an mc-commons.xsd and you xsd:redefine that into your namespace.
| You can then use all the mc xsd types in your namespace and the user
| doesn't have to write all those xmlns directives. ;-)
|
And how does this affect jaxb usage?
I don't understand the question. Did you even read the thread I had with
Kabir? You're a fast reader if you did, it was a long thread.
Here's a different summary.
The idea is to make the value type and group (and other xsd artificats from the
mc) part of your schema/namespace.
1) It will make your life simpler since you can just reuse the already defined parsing
e.g. this will automagically create a value element/type in your
namespace with the MC's value group defined in your namespace
| @XmlElement(name="value")
| public void setValue(ValueMetaData value)
|
and it will be maintained going forwards as it evolves.
The same goes for the schema definition via mc-commons.xsd
2) It will make the user's life simpler since they don't have to type xmlns
all over the place (or think about which namespace it belongs in)
| <policy xmlns="urn:jboss:policy:1.0">
| <binding name="somename">
| <!-- no need for namespace for known/native value type -->
| <value class="java.lang.Integer">42</value>
| </binding>
| </policy>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134204#4134204
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134204
18 years, 1 month
[Design of OSGi Integration] - Re: ServiceReferences outside of OSGi Deployers
by adrian@jboss.org
"johnbailey" wrote : Ok. I am working on creating a ServiceRegistry. I am following the advice to use a Deployer to trap all component deployments to get ServiceRegistrations/References for no OSGi deployments.
|
That wasn't advice, that was just a hack to get something working until it is done properly. :-)
I don't like the idea of creating an extra registry just to do "indexing" of
component -> deployment
or
feature -> component
(where feature is implemented interface or some property of the service)
we should add this to our native stuff, i.e. the controller/context.
See the discussion I had with Ales about spring-int last year.
SUMMARY: He was adding features only available in the spring integration
(e.g. default create method at the deployment level) when those should have been
available in our native POJOs and spring just reusing them.
anonymous wrote :
| The current ServiceRegistrationImpl is wrapping a KernelControllerContext. So when the ServiceRegistry receives a component deployment, there isn't a KernelControllerContext available. Should I lookup the KernelControllerContext from the Kernel, to create the ServiceRegistration?
|
If you're using the hack mentioned above, then you should be able to add
your deployer to the INSTALL stage where you can lookup the ControllerContext
in the Controller using the Component deployment's name.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134200#4134200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134200
18 years, 1 month