[Installation, Configuration & Deployment] - Re: Net-SNMP, community !~ public, JBOSS-4.0.4.GA
by pako
I solved the problem by changing perl module.
The perl module to be used is SNMP.
As CPAN states:
"SNMP - The Perl5 'SNMP' Extension Module for the Net-SNMP SNMP package."
The "core" of my perl script now is:
| my %snmp_server = (
| hostname => $host,
| communit => $opt{'c'} || 'public',
| version => '2c',
| port => $opt{'p'},
| FreeMemory => $cfg->param('FreeMemory') || '1.2.3.4.1.2',
| MaximumQueueSize => $cfg->param('MaximumQueueSize') || '1.2.3.4.1.11',
| MaxMemory => $cfg->param('MaxMemory') || '1.2.3.4.1.3',
| QueueSize => $cfg->param('QueueSize') || '1.2.3.4.1.4',
| TotalMemory => $cfg->param('TotalMemory') || '1.2.3.4.1.10'
| );
|
| my $sess = new SNMP::Session (DestHost => $snmp_server{hostname},
| Community => $snmp_server{community},
| Version => $snmp_server{version},
| RemotePort => $snmp_server{port} );
|
| if ( !($sess) ) {
| printf( "ERROR: can't contact $snmp_server{hostname}\n" );
| exit 1;
| }
|
| my @result = ( $sess->get($snmp_server{FreeMemory}), $sess->get($snmp_server{TotalMemory}),
| $sess->get($snmp_server{MaxMemory}), $sess->get($snmp_server{QueueSize}),
| $sess->get($snmp_server{MaximumQueueSize}) );
|
| if ( !(@result) ) {
| printf( "ERROR: can't contact $snmp_server{hostname}\n" );
| exit 1;
| }
|
Nothing changes in JBoss config that I posted in my first message.
So I don't know if it is a Jboss bug or a NET::SNMP perl-module bug.
Do you thik I have to open a JIRA issue anyway?
Thanks,
Bye,
pako
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972949#3972949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972949
19 years, 7 months
[JBoss Portal] - Re: How can I set the language for all portlets in the porta
by Red Eagle
Hi @ all,
i have a similiar problem like rkiesi.
I want to change the localization of the whole portal without userlogin!
I have build up a jsf portlet which contains a combo box where you can select your language and i store the selected language in the session:
Code inside my managed bean:
session.setAttribute("locale", selectedLanguage, PortletSession.APPLICATION_SCOPE);
After that i wrote a new ServerInterceptor which will be called after the LocalInterceptor of the portal:
public class LocaleInterceptor extends ServerInterceptor {
| private static Logger logger = LoggerFactory
| .getLogger(LocaleInterceptor.class);
|
| protected void invoke(ServerInvocation invocation) throws Exception,
| InvocationException {
|
| ServerRequest req = invocation.getRequest();
| HttpSession session = req.getContext()
| .getClientRequest().getSession(false);
| if(session!=null){
| String locale = (String) session.getAttribute("locale");
| logger.info("locale "+locale);
| logger.info("id: "+session.getId());
| }
| invocation.invokeNext();
| }
|
| }
Everything is working fine. The ServerInterceptor is called but i only get a null- value out of the session.
Both session that one i access in my jsf page and that one i access in my Interceptor have the same ids!
Another point i have to mention is the project- structure:
- the portlet where i want to change the locale is a web- project
- the interceptor is in a separated project because the classloader needs the interceptor first.
Anyone knows why i cannot get the value out of the session?
(is it possible that i'm accessing this attribute)
or is there another way to change the locale for the whole portlet?
regards,
Red
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972944#3972944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972944
19 years, 7 months
[JBoss Messaging] - Re: Remote JMS server
by mskonda
I tested on 4.0.4, looks like the problem still exists!
When I scope the MDB jar and deployed to server, I get NCFE on JBossConnectionFactory!!
| javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:182)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
|
|
Just to be on the safeside, here are my artifacts:
jboss-app.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-app>
| <loader-repository>com.madhusudhan:loader=simple-mdb.ear
| <loader-repository-config>java2ParentDelegaton=false</loader-repository-config>
| </loader-repository>
| </jboss-app>
|
Meta-inf
| Manifest-Version: 1.0
| Ant-Version: Apache Ant 1.6.5
| Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
| Java-Version: 1.5.0_06
| Classpath: lib/jboss-aop.jar,lib/jboss-messaging.jar,lib/jboss-remoting.jar,lib/jboss-serialization.jar
|
Inside the ear, I have jboss-aop.jar, jboss-remoting.jar, jboss-serialization.jar, jboss-messaging and mdb.jar.
*ds.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
|
| <!-- ==================================================================== -->
| <!-- JMS Stuff -->
| <!-- ==================================================================== -->
|
| <!-- The JMS provider loader -->
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
| <attribute name="ProviderName">DefaultJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <attribute name="FactoryRef">/XAConnectionFactory</attribute>
| <attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
| <attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=adl-cmi01:19104
| </attribute>
| </mbean>
|
|
| <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
| name="jboss.messaging:service=ServerSessionPoolMBean,name=StdJMSPool">
| <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
| <attribute name="PoolName">StdJMSPool</attribute>
| <attribute name="PoolFactoryClass">org.jboss.jms.asf.StdServerSessionPoolFactory</attribute>
| </mbean>
|
| <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
| <tx-connection-factory>
| <jndi-name>JmsXA</jndi-name>
| <xa-transaction/>
| <rar-name>jms-ra.rar</rar-name>
| <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
| <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
| <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
| <max-pool-size>20</max-pool-size>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
| </connection-factories>
|
Just let me know if anyone want a deployable mdb jar. I can send by email if they wish.
Thanks
Madhu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972943#3972943
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972943
19 years, 7 months
[Security & JAAS/JBoss] - Re: Strange: access rights lost
by Annegret
Hi again,
I found out that not the access rights were lost but only the username has been overwritten (which we use to get additional information from a database).
I've added support for an unauthenticated identity in our selfwritten ServerLoginModule the same way it's done in the sample LoginModules in JBoss. But the addition of an empty roleset for unauthenticated in the commit() method seems to overwrite the username of the first logged in user in the cache.
In already created Stateful SessionBeans the sessioncontext was still ok, but in all stateful SessionBeans created after an unauthenticated access the username in the sessioncontext has been overwritten by anonymous.
So I removed the addition of an empty roleset for unauthenticated identity and now it seems to work (hoperfully ;-) )
Is there a known bug in JBoss or in the ServerLoginModules ?
Annegret
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972942#3972942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972942
19 years, 7 months