j2ee

Can someone give me a working example of a build.xml for an EAR that deploys in WebSphere 6

I'm trying to convince my providers to use ANT instead of Rational Application Development so anyone can recompile, recheck, redeploy the solution anyplace, anytime, anyhow. :P I started a build.xml for a project that generates a JAR file but stopped there and I need real examples to compare notes. My good friends! I don't have anyone c...

What's your "best practice" for the first Java EE Spring project?

I'm currently trying to get into the Java EE development with the Spring framework. As I'm new to Spring, it is hard to imaging how a good running project should start off. Do you have any best practices, tipps or major DO NOTs for a starter? How did you start with Spring - big project or small tutorial-like applications? Which technolo...

J2EE - DAO DVO

I have seen two ways of implementing DAO-DVO design. 1) DVO are objects and DAOs are instantiated using factories i.e DAOs are also objects 2) DVOs are again objects but in this case, DAOs are classes which contain only static methods which accept DVOs to perform tasks. I was wondering which way is better and more scalable thanx in ad...

JSF Lifecycle and Custom components

There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bindings). Although I'll gladly upvote those who give good explanations on...

How do you build a multi-language web site?

A friend of mine is now building a web application with J2EE and Struts, and it's going to be prepared to display pages in several languages. I was told that the best way to support a multi-language site is to use a properties file where you store all the strings of your pages, something like: welcome.english = "Welcome!" welcome.spani...

Can you programmatically restart a j2ee application?

Does anyone know if it is possible to restart a J2EE application (from the application)? If so, how? I would like to be able to do it in an app-server-agnostic way, if it is possible. The application will be run on many different app servers-- basically whatever the client prefers. If it isn't possible to do this in an app-server-agn...

Are there any Open Source / Free Software alternatives to ATG?

ATG is a suite services built on top of J2EE which uses it's own proprietary flavor of ORM (like Hibernate but not), dependency injection (like Spring but not), and JSP tag libraries to offer and integrate services like customer profiling and targeting, e-commerce (shopping cart, billing, inventory, etc.), e-mail blasting, content manage...

Can the Weblogic default handler display the list of contexts?

In Jetty, if there is no deployment at '/' then the DefaultHandler displays a list of known contexts. This is very useful during development. Is it possible to configure BEA Weblogic to provide a similar convenience? ...

How do I remotely get a checksum for a file on a Windows machine?

I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs. For UNIXy servers (and Windows servers with Cygwin), I can just log in over SSH and run md5sum foo.j...

Senior J2EE interview questions

What are the best questions to ask when running a technical interview for a senior level j2ee developer? ...

track down file handle

I have a huge ear that uses log4j and there is a single config file that is used to set it up. In this config file there is no mention of certain log files but, additional files apart from those specified in the config file get generated in the logs folder. I've searched for other combinations of (logger|log4j|log).(properties|xml) and h...

Java Servlet 404 errors

What culprits are the most likely to cause a 404 resource not found error when a page in a given .WAR, autocreated by Sun's J2EE deploytool, is trying to load a Servlet in the same .WAR file? Eg: HTTP Status 404 - /MyServlet/MyServlettype Status reportmessage /MyServlet/MyServletdescription The requested resource (/MyServlet/MyServ...

ResourceBundle from Java/Struts and replace expressions

If I have a Resource bundle property file: A.properties: thekey={0} This is a test And then I have java code that loads the resource bundle: ResourceBundle labels = ResourceBundle.getBundle("A", currentLocale); labels.getString("thekey"); How can I replace the {0} text with some value labels.getString("thekey", "Yes!!!"); Such...

Good pattern or framework for adding auditing to an existing app?

I have an existing J2EE enterprise application to which I need to add auditing, i.e. be able to record CRUD operations on several important domain types (Employee, AdministratorRights, etc.). The application has a standard n-tier architecture: Web interface Business operations encapsulated within a mixture of stateless session beans a...

What are the pros and cons of using RMI or JMS between web and business tiers?

For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects? ...

Modify an xml files in a jar file with Java

I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing it does not have to drop to the command line. Any thoughts ...

Beginning J2EE

I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is best application server to use (on Li...

What tools are there for timed batch processes in J2EE?

Hello, my employer just asked me to run a timed batch process in a J2EE websphere application they have running. It's supposed to run a certain class at 1130 pm everyday. I'm not very familiar with J2EE nor websphere server (or tomcat, in the develpment environment), and I've been digging around but all I've found is about the java time...

Get Methods: One vs Many

getEmployeeNameByBatchId(int batchID) getEmployeeNameBySSN(Object SSN) getEmployeeNameByEmailId(String emailID) getEmployeeNameBySalaryAccount(SalaryAccount salaryAccount) or getEmployeeName(int typeOfIdentifier, byte[] identifier) -> In this methods the typeOfIdentifier tells if identifier is batchID/SSN/emailID/salaryAccount Which o...

Usable JSP/Servlet Hosting

Has anyone found a usable JSP/Servlet hosting provider? Lunarpages offers JSP as an option, but the server they use (Resin 2.1) is poorly implemented, out of date, cantankerous, and is always running out of memory. There's javaservlethosting.com, but they apparently have a rather negative reputation for poor service. Myjavaserver.com is ...