[Design of Management Features on JBoss] - Re: EJBAccessException when trying to invoke methods on Prof
by scott.stark@jboss.org
the security domain is already defined in the deploy/profileservice-jboss-beans.xml:
| <!-- profileservice secureview application-policy definition -->
| <application-policy xmlns="urn:jboss:security-beans:1.0" name="profileservice">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">nouser</module-option>
| <module-option name="usersProperties">profileservice-users.properties</module-option>
| <module-option name="rolesProperties">profileservice-roles.properties</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
and this refers to the profileservice-*.properties found in the root of the profileservice-secured.jar deployment:
| [573][valkyrie: deploy]$ ls profileservice-secured.jar/
| META-INF profileservice-users.properties
| profileservice-roles.properties
|
Updating the users/roles there is what you need to do.
We probably should be reporting some kind of warning when two deployments are creating the same security domain.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228464#4228464
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228464
15 years, 8 months
[Design of Management Features on JBoss] - Re: ManagedObjects for MBeans
by scott.stark@jboss.org
For the GA I have taken a new turn that adds a ManagedMBeanDeploymentFactory notion along with injection into the ManagementView bean to allow one to setup the mapping between mbeans and ManagedDeployment/ManagedComponents. Its not completely finished or tested, but an example of getting some of the web app/servlet components are:
| <bean name="WarManagerManagedDeploymentFactory"
| class="org.jboss.profileservice.management.ProxyManagedDeploymentFactory">
| <property name="factoryName">WarManager</property>
| <property name="compType">MBean</property>
| <property name="compSubtype">WebApplicationManager</property>
| <property name="pattern">jboss.web:host=localhost,type=Manager,*</property>
| <property name="patternKey">path</property>
| </bean>
|
| <bean name="WebModuleManagedDeploymentFactory"
| class="org.jboss.profileservice.management.ProxyManagedDeploymentFactory">
| <property name="factoryName">WebModule</property>
| <property name="compType">MBean</property>
| <property name="compSubtype">WebApplication</property>
| <property name="pattern">jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,*</property>
| <property name="patternKey">name</property>
| <property name="componetInfo">
| <map keyClass="java.lang.String" valueClass="java.lang.String">
| <!-- Process the servlets components -->
| <entry>
| <key>servlets</key>
| <value>MBean:Servlet</value>
| </entry>
| </map>
| </property>
| </bean>
|
The WarManagerManagedDeploymentFactory simply maps the mbeans matching pattern "jboss.web:host=localhost,type=Manager,*" name. This would match names like:
jboss.web:host=localhost,path=/admin-console,type=Manager
jboss.web:host=localhost,path=/jbossws,type=Manager
...
The patternKey property indicates which key in the matching object names provides the unique name of the deployment. This will create ManagedDeployments with a name equal to the path key value, with a single ManagedComponent of type/subtype MBean/WebApplicationManager.
The WebModuleManagedDeploymentFactory is similar, but now defines that the servlets attribute of the root component should be treated as a refeferences to other mbeans that should be have ManagedObjects created for their MBeans, and be included in the deployment as MangedComponents(type=MBean,subtype=Servlet). The component name will be the mbean object name that is referenced.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228447#4228447
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228447
15 years, 8 months
[Design of POJO Server] - Re: Caching of classes in BaseClassLoaderDomain
by bstansberry@jboss.com
Done. That would be this:
Index: BaseClassLoader.java
| ===================================================================
| --- BaseClassLoader.java (revision 88165)
| +++ BaseClassLoader.java (working copy)
| @@ -351,18 +351,22 @@
| * Check the cache and blacklist
| *
| * @param name the name of the class
| + * @param failIfBlackListed <code>true</code> if a blacklisted class should
| + * result in ClassNotFoundException; <code>false</code>
| + * if a <code>null</code> return value is acceptable
| * @param trace whether trace is enabled
| * @return the class is if it is already loaded, null otherwise
| - * @throws ClassNotFoundException when blacklisted
| + * @throws ClassNotFoundException when the class is blacklisted and
| + * <code>failIfBlackListed</code> is <code>true</code>
| */
| - protected Class<?> checkCacheAndBlackList(String name, boolean trace) throws ClassNotFoundException
| + protected Class<?> checkCacheAndBlackList(String name, boolean failIfBlackListed, boolean trace) throws ClassNotFoundException
| {
| BaseClassLoaderPolicy basePolicy = policy;
| BaseClassLoaderDomain domain = basePolicy.getClassLoaderDomain();
| if (domain == null)
| return null;
|
| - return domain.checkClassCacheAndBlackList(this, name, null, basePolicy.isImportAll());
| + return domain.checkClassCacheAndBlackList(this, name, null, basePolicy.isImportAll(), false);
| }
|
| /**
| @@ -426,17 +430,9 @@
| if (result != null)
| return result;
|
| - try
| - {
| - result = checkCacheAndBlackList(name, trace);
| - if (result != null)
| - return result;
| - }
| - catch (ClassNotFoundException blacklisted)
| - {
| - if (trace)
| - log.trace(name + " has been blacklisted; cannot load from domain cache");
| - }
| + result = checkCacheAndBlackList(name, false, trace);
| + if (result != null)
| + return result;
|
| synchronized (this)
| {
| Index: BaseClassLoaderDomain.java
| ===================================================================
| --- BaseClassLoaderDomain.java (revision 88158)
| +++ BaseClassLoaderDomain.java (working copy)
| @@ -1487,10 +1487,14 @@
| * @param name the name
| * @param path the path of the class resource
| * @param allExports whether to look at all exports
| + * @param failIfBlackListed <code>true</code> if a blacklisted class should
| + * result in ClassNotFoundException; <code>false</code>
| + * if a <code>null</code> return value is acceptable
| * @return the class when found in the cache
| - * @throws ClassNotFoundException when the class is blacklisted
| + * @throws ClassNotFoundException when the class is blacklisted and
| + * <code>failIfBlackListed</code> is <code>true</code>
| */
| - protected Class<?> checkClassCacheAndBlackList(BaseClassLoader classLoader, String name, String path, boolean allExports) throws ClassNotFoundException
| + protected Class<?> checkClassCacheAndBlackList(BaseClassLoader classLoader, String name, String path, boolean allExports, boolean failIfBlackListed) throws ClassNotFoundException
| {
| if (path == null)
| path = ClassLoaderUtils.classNameToPath(name);
| @@ -1498,8 +1502,11 @@
| Class<?> result = checkClassCache(classLoader, name, path, allExports);
| if (result != null)
| return result;
| -
| - checkClassBlackList(classLoader, name, path, allExports);
| +
| + if (failIfBlackListed)
| + {
| + checkClassBlackList(classLoader, name, path, allExports);
| + }
| return null;
| }
|
Which is simple enough. I'm not sure if there's a use case for failIfBlackListed=true, but it's exposed if there is one.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228440#4228440
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228440
15 years, 8 months
[Design of Management Features on JBoss] - why are some jars required by a Profile Service client not i
by ips
In order to invoke methods on the Profile Service remotely, I needed the following jars in my classpath:
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jnp-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\common\lib\jboss-security-aspects.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jbosssx-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aop-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-common-core.jar
| rem For the call to InitialContext.lookup()...
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-remoting.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-aspect-jdk50-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\trove.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\javassist.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-security-spi.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-javaee.jar
| rem For remote invocations on the ProfileService proxy (e.g. ProfileService.getDomains())...
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-integration.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-common-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-core-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-ext-api.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-spi-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-proxy-impl-client.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-ejb3-security-client.jar
| rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\concurrent.jar
| rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-client.jar
| rem set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\client\jboss-mdr.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-managed.jar
| set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JBOSS_HOME%\lib\jboss-metatype.jar
I have a couple questions:
1) Several of the required jars do not exist under the client/ dir:
common\lib\jboss-security-aspects.jar
| lib\jboss-managed.jar
| ib\jboss-metatype.jar
|
Shouldn't all of the jars required by a Profile Service client be available under client/?
2) The following jars are not referenced in the manifest of jbossall-client.jar:
common\lib\jboss-security-aspects.jar
| lib\jboss-managed.jar
| ib\jboss-metatype.jar
| client\trove.jar
| client\javassist.jar
|
If we're going to call the jar jbossall-client.jar, shouldn't it contain all jars required for typical client access?
Thanks,
Ian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228438#4228438
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228438
15 years, 8 months