[Design of JBoss internal QA (Test Suite)] - Re: Testsuite Failures
by ambika
Hi,
There is no error if i just start the jboss server in all mode. But when i try to run the testsuite, its giving error for authentication. As in the jboss enterprise platform installation document mentioned, most of the services requires authentication,so we cant do any operation, untill we provide a proper authenication.
If i make the changes suggest in the doc to disable jmx authentication, tests will pass, that is without authentication/
Do i need to make any entry in the any of the *.properties file so that we can authenicate properly. That is, whatever user/password and roles defined for the various task, do we need to add them in the property files of the server?
Regards,
ambika
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066162#4066162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066162
18 years, 8 months
[Design the new POJO MicroContainer] - Re: Property lookup interceptors
by adrian@jboss.org
"alesj" wrote : "adrian(a)jboss.org" wrote :
| | Which would probably cover most simple use cases?
|
| What about:
|
| | <property name="x">
| | <value-factory bean="LDAPLookup" method="getValue" />
| | <parameter>foo.bar.prop</parameter>
| | <parameter>mydefault</parameter>
| | </value-factory>
| | </property>
| |
That would remove the need for the interface (what was I thinking? :-)
But I don't think the value factory needs to know the default value,
it just returns "null" when it doesn't have the property.
| <property name="x">
| <value-factory bean="LDAPLookup" method="getValue" default="mydefault">
| <parameter>foo.bar.prop</parameter>
| </value-factory>
| </property>
|
We should probably still have the shorthand mechanism for simple one
parameter methods.
| <property name="x">
| <value-factory bean="LDAPLookup" method="getValue" parameter="foo.bar.prop" default="mydefault"/>
| </property>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066161#4066161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066161
18 years, 8 months
[Design the new POJO MicroContainer] - Re: Property lookup interceptors
by adrian@jboss.org
This is the wrong approach. The system property stuff is legacy from the MBean days.
It's certainly the wrong api to be extending, we need to let it die. :-)
The correct approach is should be to create your own ValueMetaData
| <deployment xmlns="urn:jboss:bean-deployer:2.0" xmlns:ldap="urn:jboss:ldap:1.0">
|
| <bean name="LDAPLookUp" ...>
| <!-- ldap config here -->
| </bean>
|
| <bean name="blah">
| <property name="x"><ldap:property bean="LDAPLookUp" key="ldapkeyhere" default="...">
| </deployment>
|
The ldap:property parses to an implementation of ValueMetaData,
something similar to the inject value metadata (AbstractDependencyValueMetaData),
except it gets the value from the LDAPLookUp bean.
(untested code)
| public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
| {
| ControllerState state = dependentState;
| if (state == null)
| state = ControllerState.INSTALLED;
| Controller controller = context.getController();
| ControllerContext lookup = controller.getContext(getUnderlyingValue(), state);
|
| if (isLookupValid(lookup) == false)
| throw new Error("Should not be here - dependency failed - " + this);
|
| if (lookup == null)
| return null;
|
| Object ldap = lookup.getTarget();
| if (result instanceof LDAPLookup == false)
| throw new IllegalStateException("Not an LDAPLookup: " + ldap);
| LDAPLookup ldapLookup = (LDAPLookup) ldap;
| Object result = ldapLookup.lookup(key);
| if (result == null)
| return defaultValue;
| return result;
| }
|
But it is not documented how to do this, the only close example
is the javabean namespace but that just creates objects directly from the xml.
There maybe a case for abstracting this such that a bean could
implement a "ValueFactory" interface
| public interface ValueFactory
| {
| Object getValue(String key);
| }
|
and us including a generic piece of xml in our schema to enable its use
| <property name="x"><value-factory bean="LDAPLookup" key="..." default="..."/></property>
|
Which would probably cover most simple use cases?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066149#4066149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066149
18 years, 8 months