[Design the new POJO MicroContainer] - JBCL-7 - ClassLoader validation
by adrian@jboss.org
I've committed some work that does the majority of this work,
but it is still incomplete and almost certainly requires a bit more refactoring
internally.
This introduces the notion of a ClassLoadingSpace
which is really just a Set of related ClassLoading modules.
The ClassLoadingSpace has a two phase api:
join() - for when a module joins a classloading space
split() - for when a module leaves a classloading space
resolve() - work out when classloading spaces need to join
unresolve() - nothing currently ;-)
The basic strategy is that as each module is added to the ClassLoading
a ClassLoaderSpace of just that module is constructed.
Then during the resolution, it figures out that it and an imported Module
need to be in the same ClassLoadingSpace so it does a join on the
their respective ClassLoadingSpaces.
Consistency checks are done during the join()
The work still to do at this point is:
* Tests (and handling) for circularity/self-depdendency in imports
* Handling of split packages (i.e. two modules have the same
package at the same version - but probably different classes, e.g. language packs)
* Validation of optional imports (e.g. uses constraints) currently, I'm ignoring these
* Better error reporting, i.e. more info on why a conflict occurs (why the
modules are related) rather than just that a conflict has occurred
Also, currently the initial resolve() is done at ClassLoading.addModule().
But since that is an inCallback throwing an error from there
doesn't lead to a failed deployment, just a warning. So this needs
to be revisited (it should just be done lazily when the MC calls back on
the RequirementDependencyItem).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163516#4163516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163516
17 years, 9 months
[Design of JBoss Portal] - how to change Portlet Preferences
by lampard
Hello
I create a portlet with a preference in portlet.xml, and deploy it successfully on JBoss Portlet Container.
The xml for this porlet is following:
<portlet>
| <description>PreferencesPortlet</description>
| <portlet-name>PreferencesPortlet</portlet-name>
| <display-name>PreferencesPortlet</display-name>
| <portlet-class>it.portlet.PreferencesPortlet</portlet-class>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| </supports>
| <portlet-preferences>
| <preference>
| <name>userName</name>
| <value>Mark</value>
| <read-only>false</read-only>
| </preference>
| <preferences-validator>it.validator.UserNameValidator</preferences-validator>
| </portlet-preferences>
| <portlet-info>
| <title>Portlet Preferences</title>
| <short-title>PreferencesPortlet</short-title>
| </portlet-info>
| </portlet>
|
It works fine but when i change the value of preference value in xml it does not reflect it, I try to modify the preference in runtime but when i read the value of the preference in runtime it always show old value. I know that i can edit this value using protlet api, using setValue() method and store() method, but I want know why this doesn't work in my portlet.
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163513#4163513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163513
17 years, 9 months