I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question, and so in the same spirit, I am asking this question for Java/J2EE Developer.
What questions do you think should a good Java/J2EE programmer be able to answer?
I am marking this quest...
This may sound totally stupid, but is a case of real life :(
I'm able to display a HTML table with a "virtual" link name.
Something like this:
Xyz description <a href="docId=123">document.doc</a>
Xyz description <a href="docId=456">documentB.doc</a>
Xyz description <a href="docId=798">documentC.doc</a>
This doc id represents ...
I need to detect information about the Application Server my EJBs are running in.
The System.properties contain a lot of information about Java and the Operating system, but I need to know what type of application server and if possible even the version.
Is there a way to get this information in an application independent way (JMX maybe...
My application loads a xml and update xml elements for each request.
I have 10 to 20 requests come at a time , the xml loading process is taking some time for each request because it is in synchronized block.
The xml size is 500 KB and used DOM parser (Legacy code).
Are there any ways to improve performance?
...
I'm trying to execute a long 'INSERT ON DUPLICATE KEY UPDATE' with up to a few thousand rows in a MySQL+JBoss+Hibernate application. It looks something like:
INSERT INTO Table (field1, field2, field3) VALUES
(value1_1, value2_1, value3_1),
(value1_2, value2_2, value3_2),
(value1_3, value2_3, value3_3),
...
ON DUPLICATE KEY UPDATE ...
...
I want to write my own version of url rewriting for my app, but I don't know how to change the url of the incoming request in the filter.
I tried just forwarding to the rewritten url, but that makes it so all other filters in the chain are not called.
...
Hi,
On WebLogic 10.0 I use the "Shared J2EE Libraries" ( http://download.oracle.com/docs/cd/E11035_01/wls100/programming/libraries.html ) feature of WLS to group some jars which would need to be accessible in multiple ear's. These jars resided on the system classpath, and I try to move them into the shared lib from there.
My problem is...
Is it possible to know in my Java code the port where a J2EE application has been deployed?
Is it possible to do a not container specific solution?
Thanks a lot in advance.
Edit: It whould be nice if this is discovered in a ServletContextListener since it will be done on startup.
...
Hi there,
In the old days we used to access the database through stored procedures. They were seen as `the better' way of managing the data. We keep the data in the database, and any language/platform can access it through JDBC/ODBC/etc.
However, in recent years run-time reflection/meta-data based storage retrieval mechanisms such as...
Hi,
I have a "framework" running on a Weblogic 10.0 (or 10.3) appserver, where the framework consists of multiple enterprise apps, each responsible for a different resource adapter. A client application gets deployed into the domain, uses JNDI to obtain reference to one of the resource adapter Connector classes, does its invocations and...
I'm currently developing a Java web application myapp and when deployed in Tomcat 6 server, I access myapp with this URL: http://localhost:8080/myapp
Instead I want to access my application using this URL: http://myapp:8080 since myapp will be the only application deployed in my Tomcat 6.
How do I do it?
...
Can anyone please share their experience of invoking unix scripts from J2EE env, either servlet or EJBs? Note that these scripts are to be invoked for real time processing and not offline processing.
...
I recently stumbled across Eclipse's Dstore server, couldn't understand what it really does from the articles on the net.
Can someone please tell me what is the use of Dstore server? Also, is it possible to develop server side code which could be accessed from client machine through Dstore server, like web requests are served by servlets...
Hi!
I have an enterprise application A and B deployed (in WLS 10.0). A is the "framework", B is a client app.
The client issues the following calls:
Object o = ctx.lookup(jndiName); // line 1
cf = (ConnectionFactory) o; // line 2
ConnectionFactory is an interface, defined as:
public interface ConnectionFactory
extends java.io.S...
Hi,
I read that EJB 2.x spec does not support nested transactions.
But logically think we can call an EJB method that has REQUIRES_NEW txn attribute from another EJB method that acutally started a transaction
Isn't this a valid case. If valid isn't this what is called nested transactions.
Please point me if I am missing anything here....
I started out attempting to do this with the Length ant task, but realized that that would be done before the ear is packaged. Packaging the ear, then checking the file size, and then placing it in the ear would effect the size of the ear.
Is there a way to get the ear's size programmatically at run-time? Or perhaps an MBean that woul...
What could be the reason for the following exception from Axis... Http verion used was 1.0.
Read this could be solved if the following property is set
stub._getServiceClient().getOptions().
setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.FALSE);
But the above property is applicable only for ...
There is a table phonenumbers with two columns: id, and number. There are about half a million entries in the table. Database is MySQL.
The requirement is to develop a simple J2EE application, connected to that database, that allows a user to download all numbervalues in comma separated style by following a specific URL.
If we get all ...
An organization I work with is heavily invested in .NET technology, including several high-traffic ASP.NET websites that are used by internal and external customers.
We are looking into hiring a solution architect to support these applications and work on new initiatives.
Several of the resumes coming in are from candidates whose entire...
How to provide multi language support through JSP/Servlet? How to include static data of different languages at run time on basis of language selected?
...