jboss

HttpServletRequest.getRemoteAddr() returning wrong address

We need to log the client's IP address from a Seam action. Currently, we're using the code: ExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); HttpServletRequest request = (HttpServletRequest)context.getRequest(); this.remoteAddress = request.getRemoteAddr(); However, this seems to be always returning ...

404 Error for a deployed EAR file.

I am deploying a large application with approx - 12 WARs and JARs bundled in an EAR file. However I am unable to reach the application page from browser. A few things I have verified - Server log, I don't see any exception. It's a clean deploy. Server console shows that the application is deployed. All the app components are deployed ...

java:how to hide static resources like html ,images from user on jboss platfrom?

I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my folder structure is mainfolder(contains subfolders and jsp pages) images(contains all of images files) headerfiles(header files) javascript(javascript files) url for website login page is mywebsite.com/...

deploy struts app on jboss

I'm working through some struts tutorials, and here's one of the ones I'm using: http://www.vaannila.com/struts/struts-example/struts-login-page-example-1.html I downloaded the "source + lib" link at the bottom of that page, I copied the Example2 folder from the zip to my webapps folder under tomcat, and everything works as advertised. ...

struts2 application on jboss

This is a bit of a continuation of http://stackoverflow.com/questions/1777339/deploy-struts-app-on-jboss, but it's different enough that I felt it warranted a new question. In the other question, I was working with struts, but now I'm working with struts 2. The tutorials here are broken up into struts tutorials and struts2 tutorials. ...

JBoss MQ tutorial

I'm looking for a JBoss MQ tutorial (on JBoss Tools) so that I can write an MDB and a client. I can find only JBoss Messaging. ...

Is it possible to monitor jboss if it happens to run out of memory?

Sometimes when I redeploy war too many times, jboss gives java.lang.OutOfMemoryError: PermGen space error, is it possible to monitor jboss with other Java program that is not run inside jboss, to make sure it has not run ot of memory and if it is, then automatically restart jboss? ...

creating a queue in JBoss MQ

I'm trying to call send a message to a JBoss MQ queue but it seems the queue is not bounded. I use the following code to send the message : Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");...

Spring JTA configuration - how to set TransactionManager?

We configure our Spring transaction in Spring config as: <tx:jta-transaction-manager/> I gather this means that Spring will automatically discover the underlying JTA implementation. So when we start up JBoss we see these messages while Spring searches: [JtaTransactionManager] [ ] No JTA TransactionManager found at fallback JNDI loca...

What is the most efficient way to repeat an action every x minutes?

I have an application that runs in JBoss. I have an incoming web service request that will update an ArrayList. I want to poll this list from another class every 60 seconds. What would be the most efficient way of doing this? Could anyone point me to a good example? ...

Implementing SSO with SAML and JBoss

I want to implement SSO with SAML tokens in JBossAS. The scenario is as follows. I have 2 applications app1 and app2 running on 2 JBoss instances. Login into app1 and enter username / password using form based auth. Once login, click on the link that should be redirected to the app2 page. This should use SSO with SAML tokens on JBoss...

J2EE programmers do not write to files

Today one person told to me that "J2EE programmers do not write to files". Why can I not write to files from within a J2EE container (for example from JBoss)? What is wrong? ...

Configuring container-based authentication with alternative digest methods

Following up on a prior question, I'm trying to figure out how to set up container-based authentication for a J2EE application. Specifically, I need to be able to apply a password digest algorithm other than the ones supported by the java.security.MessageDigest (which are SHA, MD2, or MD5 - here's where I think that limitation is documen...

JMS message to remote server

I need to send a message to a remote server's queue (running "JBoss MQ") so that it can process the message and act on it. Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces"); p...

post message to a remote JMS provider

I want to be able to send messages to a remote JBoss server (JBoss MQ). I can do it for a local one but i'm stuck when trying with a remote one. can anyone explain to me how to do it ? are there any specific steps to take ? [what i've tried so far] I need to send a message to a remote server's queue (running "JBoss MQ") so that it ca...

Can you configure a JBoss web app to be single threaded?

Can you configure a JBoss web application to be single threaded? Ie: only accept one incoming web request (ie: socket connection) at a time? Or is there a way to say max 3 concurrent connections? I know it's an unusual configuration but we were curious.. ...

How can I remove unwanted lines from jboss logs?

I made mistake and didn't remove debugging lines from code before it was deployed to production and some information that shouldn't be in logs is in jboss log files. How can I make java program to filter all unwanted lines by keword? Or is there any tool for this already? ...

Hibernate Transaction question

Hi there, I'm using Hibernate with a JTAFactory - in my case: jBossJTA - I've configured my hibernate.xml with the current JTA, now maybe I'm doing something wrong, my dao code looks like this try{ ses = sessionFactory.getCurrentSession(); ses.beginTransaction(); doSomeWork... session.getTransaction().commit(); }catch(Exception...

What should I do with custom Log4j appender dependancies.

I've written a custom log4j appender that creates a new Solr document for each log entry and I'm having problems deploying it to JBoss. The source is viewable on github but the real problem is trying to use the appender from JBoss. The relevent bits of jboss-log4j.xml look like this: <appender name="SOLR" class="com.stuartgrimshaw.sol...

Jboss5, unauthenticated calls to secured EJB via @RunAs

I'm attempting to call methods on a secured EJB from an unauthenticated source (a Message Driven Bean hooked up to a queue). The MDB has an EJB injected into it via @EJB, which is fine, but the target EJB has @SecurityDomain("stuff") and @RequireRole("user"), and on execution generates huge stack traces around: 17:14:03,275 ERROR [STD...