One of the first things I've learned about J2EE development is that I shouldn't spawn my own threads inside a J2EE container. But when I come to think about it, I don't the reason.
Can you provide a clear explanation why it is discouraged?
I am sure most enterprise applications need some kind of asynchronous jobs like mail daemons, idl...
Im am writing an application for the JBOSS JEE-Server. I would like to have the DB-access code quite robust. Thus I have created retry loops so that the request won't fail because of temporary network problems. Now I would like the execution of the request to pause in between retries.
The server thread has been spawned by a request to a...
Following up on an older question of mine, I managed to get URL Rewriting working somewhat correctly for my struts project where URLs like search?q=blah get converted to queries search.action?q=blah. We use UrlRewriteFilter for this. This seems to forward fine to struts (if making sure it has a filter mapping with FORWARD), but when the ...
I like JNDIView that shows me all JNDI's, is there anything usefull beside that in jmx-console?
P.S. I know i could make my own MBeans, but i want to know what default cool actions are available.
...
I'm currently working on a web app that makes heavy use of JSF and IceFaces. We've had some discussions of moving to another presentation layer, and I thought I'd take the discussion out into SO and see what the experts think.
I'm curious if anyone could weigh in on the pros and cons of the various Java presentation layer technologies....
Here's what I'm trying to do:
public void init(ServletConfig config) {
// ...
URL url = new URL("http://myhost:port/path/to/otherservlet");
// ... do stuff with contents of url
}
This works fine, but myhost and port are hardcoded and I want to avoid that. I want
URL url = new URL("/path/to/otherservlet");
but that's not...
I would like to know the implication(s) of using a synchronous receiver in a web application. A receiver that continuously looks for message from the specified queue ? I would like to specifically know if it is going to be a big drag in terms of performance.
The receiver would be some what like this
while (true) {
Message m = .receiv...
Hello,
I'm using the JMS API to send messages to a Websphere MQ server.
The application that pulls the messages i create want's me to set up the ApplicationID field
in the MQMD structure to constant value.
I could not find a way in the JMS API to access the MQMD structure
The question: Is there a way doing this? if yes then how? If no, ...
I'd like to assign an unique identifier to a soap request as soon as it arrives at my (GlassFish 2) server. I suppose I use a handler for this.
But where can I store such an ID? I need it to relate log-lines from multiple classes. For this I need some sort of context-object. Anyone an idea?
...
I have some SOAP webservices build with JAX-RPC. These work fine. But as soon as I add a handler, I get an exception. When the binding is removed from the webservices.xml, everything works fine again.
The weird thing is, the handler itself isn't included in the stacktrace of the exception. I also noticed, the init and getHeaders method...
I'm uploading a file to the server. The file upload HTML form has 2 fields:
File name - A HTML text box where the user can give a name in any language.
File upload - A HTMl 'file' where user can specify a file from disk to upload.
When the form is submitted, the file contents are received properly. However, when the file name (point ...
I would like to have a JUnit (or other) system where the enterprise beans can be tested in a mock environment so that all resources/beans and so on are injected locally. The enterprise beans should not have to accomplish this. All kinds of injection should be supported.
I would like to have a maven plugin for this so that the tests can...
I have the following problem with an EJB 2 SessionBean when deploying in JBoss 5:
The SessionBean (called LVSKeepAliveDispatcher) requires a specific user role (called "LVSUser"), specified by
<method-permission >
<description></description>
<role-name>LVSUser</role-name>
<method >
<description></descripti...
I'm working on a service that runs in a java app server farm that needs to do some periodic jobs (say, once every 2 minutes). The service must interface to external entities, and it is necessary to synchronize the different instances so that only one of them works on the job at a given time. Since the service uses a DB during this job,...
Configuration management for our EE application requires us to create a new database connection datasource from time to time. We do this right now by modifying the deploy/[dbtype]-ds.xml file, inserting an additional connection definition into this file. The problem is, doing so causes the existing connections to be undeployed and rede...
Hi, there. I'm interesting in best practices of using LDAP authentication in java-based web application. In my app I don't want to store username\password, only some id. But, I want retrieve addition information (Name, Last name) if any exists on LDAP catalog.
...
I am referring to container managed transaction attributes in Enterprise Java Beans. I can't think of any use cases where using 'Mandatory' and 'Never' makes sense. Can anyone please explain what cases warrant using these transaction attributes?
...
I have a portal built on JBoss Portal 2.5.4 that needs to have some I18N. On the login.jsp page (which is in portal-server.war), we added a language switch. One of the links on the page is to the Forget Password facility.
For reasons related to look-and-feel, the ForgetPassword page is implemented as a maximized portlet inside our...
I heard from various sources that J2EE is highly scalable, but to me it seems that you could never scale a J2EE application to the level of the google search engine or any other large website.
I would like to hear the technical reasons why it is so scalable.
...
A hobby project of mine is a Java web application. It's a simple web page with a form. The user fills out the form, submits, and is presented with some results.
The data is coming over a JDBC Connection. When the user submits, I validate the input, build a "CREATE ALIAS" statement, a "SELECT" statement, and a "DROP ALIAS" statement. ...