[Management, JMX/JBoss] - Remote JNDI Lookup on Remote MBean Server
by price34
I am trying to get a server connection to a remote MBean Server. I am using the following code:
MBeanServerConnection server = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, jndiUrl);
InitialContext ic = new InitialContext(env);
server = (RMIAdaptor) ic.lookup("jmx/invoker/RMIAdaptor");
When running the code on one of the remote servers I get a java.lang.ClassCastException on the lookup which is strange because RMIAdaptor actually extends the MBeanServerConnection. I think it is something else. When I run this code on my desktop against my local machine it works fine. But when I run this code on my local machine against a remote server I get a javax.nameing.CommunicationException.
Any help on how to query the Mbeans on a remote machine would be helpful?
FYI this code worked fine in all aspects with jboss 4.0.3 it is 4.0.4 that is giving me the problems.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049526#4049526
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049526
18 years, 10 months
[JBoss Seam] - evaluting s:hasPermission once only in a page
by ptalekar
i have a page with quite a few :
<ice:inputText id="enterpriseName"
value="#{enterpriseTreeManager.enterprise.name}" size="50"
required="true"
disabled="${!s:hasPermission('enterprise', 'edit', null}">
i am using the RuleBasedIdentity, so I also have a security.drl file with all the premissions. my problem is that the Identity.hasPermission() method get called for each s:hasPermission. is there a way to store the result of s:hasPermission in a page scoped variable and then use that instead of s:hasPermission?
i tried the following but it still calls Identity.hasPermission multiple times:
<c:set var="editPermission" scope="page" value="${s:hasPermission('enterprise', 'edit', null)}"/>
and then
<ice:inputText id="enterpriseName"
value="#{enterpriseTreeManager.enterprise.name}" size="50"
required="true"
disabled="${!editPermission}">
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049525#4049525
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049525
18 years, 10 months
[JBoss Messaging] - Re: Viewing message contents in a queue
by parressh
So, it would make sense for the JMX MBean for the queue to show a message count of 20, but for the QueueBrowser to not see any messages? So that inconsistency is normal?
I'm looking through the docs now to see how to configure the number of messages pulled down from JMS, but I'm not sure I've found it yet. I have the following config in standardjboss.xml, which sets the MaximumSize property to 3. However, the problem is seen when there are 20+ messages, so this must not be the setting you're referring to.
| <invoker-proxy-binding>
| <name>message-driven-bean</name>
| <invoker-mbean>default</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <CreateJBossMQDestination>true</CreateJBossMQDestination>
| <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
| <MinimumSize>1</MinimumSize>
| <MaximumSize>3</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>10</ReconnectIntervalSec>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
Also, I would have thought that the messages would still be on the queue until the MDB finishes and the transaction commits. But it looks like you're saying that messages can be pulled down, but not processed yet, and they're not considered to be on the queue. Did I understand that correctly?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049521#4049521
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049521
18 years, 10 months