I am trying to figure out what some legacy code is doing. What exactly is this line doing, and why would I need it this way?
String lineSeparator = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
I found it in the logger implementation of the web/ejb applicatio...
Where do we start using Unit testing?
I have some doubts about where to start using Unit testing.
I am doing unit testing with Junit in RAD. And I am doing it after all code is ready to deploy or may be after deployment. I am confused why we are doing unit testing after code is almost ready to deploy.
My question is when we should start ...
Using JPA query language, how do I determine the size (number of rows) in an entity (table)?
...
I have read for a while that EJBs are not useful or cumbersome. But what other ways implement the business delegate pattern?
How do EJBs differ from the approach the Spring recommends?
Also, how have recent advances with EJBs changed your opinion.
...
I am looking for:
What JMX is.
Where I can find some good JMX
Tutorials.
What JMX can provide to me as a
Java EE programmer.
Anything else I should be aware
of.
...
I ran across some code recently at work (recreated to be similar to what I am dealing with) similar to the code below
Is there a way I can rework the code below to use one data structure (with performance in mind)?
Here is some code to illustrate what I mean:
public class ObjectMapper {
private Map<UUID,Integer> uuidMap;
pri...
Hi,
I am using Spring persistence framework for my project.
I want to call oracle function or stored procedure from this framework.
Can anybody suggest how can I achieve this.
Please give solution for both * oracle function and *stored procedure.
Thanks.
...
/**
*
* ModifyRDN .java
* Sample code to demostrate how ModifyRDN/ModifyDN works.
*
*/
import javax.naming.;
import javax.naming.directory.;
import java.util.Hashtable;
public class ModifyRDN
{
public static void main(String[] args)
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"co...
Can I somehow restore the session on JBoss after restart? I want to use it on my development machine.
...
Hi ,
I am new to GWT.I have developed a GWT application in version-1.6.4 and it is working fine.Now I want to integrate with that project in existing J2EE application.I dont know how to go ahead?
Where to copy GWT source codes in existing J2EE application.I am using RPC also in GWT.
Can anyone provide help on this?
Thanks.
...
Is this something you can configure and/or dependent on your Application Server? I am wondering if a singleton object will be reconstructed when you re-deploy the application.
I would rather ask here and try and get a concise answer than googling randomly or resorting to reading J2EE Servlet Specs - I hope people can understand :)
...
hi,
I have a built small web app using java/j2ee. I want to host it my self in my own servers (i have none now). I have already downloaded ubuntu server OS.
I am complete new Bee. I am just learning things now. I prefer to host my app my own servers (preferably using Linux, Apache and MySQL) rather than google app engine or anyother ho...
Hi,
What is the differece between a dead letter Queue and a back out queue?
In WebSpehre MQ terms and in terms of Application Servers.
All J2EE app servers have a MQ Provider do they also have a construct of a Dead Letter Queue or is that something specific to WebSphere MQ?
My understanding of a back out queue is as follow:
If MQ is...
I'm trying to lookup an EJB from a standalone java application. I'm thinking in terms of WebSphere Application Server 6.1, but if someone knows how to do this for another application server, it may get me in the right direction.
What I'm currently doing:
initialContext= new InitialContext(env);
initialContext.lookup("");
lc ...
I need a way to store application-level data (i.e. cross user sessions) in ASP.NET. In J2EE I'd use the ServletContext. Is there an equivalent in ASP.NET?
...
I'm currently using Java EE to inject my EntityManager into a web app as follows:
@PersistenceContext
EntityManager em;
@Resource
UserTransaction utx;
I have this in a request scoped JSF bean. It works, but it's a pain because to avoid the NoTransactionException I have to wrap every DAO method like so:
public void saveSomething(Obj ...
I have several J2EE web applications running inside the same application server and I wanted to externalize the properties files that are inside the jars to a new directory to make these properties visible.
What is the recommended way to load these properties files?
Thanks.
...
Does anyone have experience with using Terracotta with Hibernate Search to satisfy application Queries?
If so:
What magnitude of "object
updates" can it handle? (How's the
performance)
What kind of performance do the
Queries have?
Is it possible to use Terracotta
Hibernate Search without even having
a backing Database to sat...
I wanted to write a program where an Excel sheet is imported onto a webpage. Also the look and feel of the webpage should be the same as that of the Excel sheet. The whole excel sheet should be displayed on the webpage.
Is there any package for Java where we can import the Excel sheet and print its data and its sheet onto the webpage?
...
I need to bring down a server in Weblogic 10.3 (which will have only one application deployment) and display a "Under Maintenance" page when the user requests the application.
Is there a way to use two managed servers or WLST to do this somehow?
...