I'm researching the development of Enterprise Applications in Java, .NET and Groovy. For each platform, we're going to try how hard it is to realize a simple SOAP web service. We'll use the tools and libraries that are most commonly used, to research the real world as accurately as possible.
In this regard, would it be best to use the n...
I've got a one-to-one relation between a dealer and a seller which should be lazy using a proxy. For the side on which the foreign key is defined (the seller, references the dealer), this works fine. But it doesn't work from the other side - the seller is always loaded eagerly. I set constrained="true" as described in "Some explanations ...
Here's what I want to do. I want to store code objects in my hibernate driven java swing application. I want to allow the user to create code objects that can affect the data with a limited scope, like in a function with only access to members of that member's class. I'd even really like to have a full on little ide (though scaled dow...
Hi all,
I was wondering if anyone could help me on using NetBeans....
I just need one piece of advice.
Here's the problem:
When I create a new Java Desktop App I can manage to "call" another Frame Form class from the skeleton class that is created. But when I create another class and edit it's design using the Swing gui editor, I cannot ...
Consider this scenario: I've an XML file called person.xml with the following data in it.
<person>
<name>MrFoo</name>
<age>28</age>
</person>
If I want to read this XML into a Java object, I would be creating a Java bean called PersonBean (with getters/setters for the attributes) as:
class Person{
String name;
int age...
I know, that for C++ and Java it is a well established naming convention, that constants should be written all uppercase, with underscores to separate words. Like this (Java-example):
public final static Color BACKGROUND_COLOR = Color.WHITE;
public final static Color TEXT_COLOR = Color.BLACK;
This naming convention is easy to understa...
As far as i know, there is no direct equivalent in C#. My current idea is to use a Dictionary with a custom IEqualityComparer, that checks for reference equality.
However, this seems to lose the advantage gained by hashing. Is there a way to get an individual hashcode out of every different object? Or is this impossible and I should use...
In a java app, assuming I have option of choosing the following comparison methods
equalsIgnoreCase(String anotherString)
compareToIgnoreCase(String str)
Which one is faster?
Thanks in Advance
...
Hi,
I have created compression and decompression technique using GZipinputstream in both c#.NET and Java. If I compress up to 13239 bytes in c#.NET then i can decompress it in Java but if I compress more than 13239 bytes in c#.NET then i am not able to decompress it in Java. But I can decompress it using C#.NET. Any ideas what could be ...
I'm currently attempting to implement having a (signed) applet communicate to a server program via SSL. I have found the right kind of incantations to create key stores for the client, the client's trust manager, and the server. This allows me to create compatible SSL contexts on the client and the server.
However, as it stands, this se...
I would like to send a html string with a GET request like this with Apaches HttpClient:
http://sample.com/?html=<html><head>...
This doesnt work at the moment, i think its an encoding problem. Do you have any ideas how to do that?
method.setQueryString(new NameValuePair[] {new NameValuePair("report", "<html>....")});
cli...
Why does the Iterator interface not extend extend Iterable?
The iterator() method could simply return 'this'.
Is it on purpose or just an oversight of Java's designers?
It would be convenient to be able to use a for-each loop with iterators like this:
for(Object o : someContainer.listSomObjects()) {
....
}
where listSomeObject retu...
I am using AES/CBC/PKCS5Padding padding standard in java and my friend uses PKCS7 standard in c#.NET
If My friend encrypt the data using AES and send me the key then I can decrypt it.
But If my data length increases more than 2920 bytes then if i encrypt the data in c#.NET and decrypt the data in java then my decryption does not work go...
I have been throwing ServletExceptions in the past, when something/anything goes wrong in a Servlet, mostly just wrapping the exception in the ServletException.
Now I am thinking it is actually better to not throw a ServletException, but to respond with response.sendError(sc) and use the correct HTTP status codes.
if I can't send an e...
Does FileChannel#map allocate all the memory needed for the resulting ByteBuffer immediately, or is it only allocated on-demand during reads from the buffer?
I just tried mapping all of a 500+ MB file in a trivial test program, and looked at the memory usage of the process. (Using both Runtime#totalMemory and eyeballing it in the OS X A...
I have a JFrame with null layout and two one character JLabels on the same position.
When I add a MouseListener the MouseClicked event always goes to the first JLabel even if it has a transparent pixel there. Is there a solution for this?
(eg: I display "a" and "á" and I need to know if the user clicked on the character or on the accen...
I need to implement handling of redelivery of JMS messages in the application that is deployed on the IBM-backed environment, so JMS provider is standalone MQ V6.0.
Do you know if it is setting JMSXDeliveryCount property correctly and I can rely on the values of this very property?
...
My servlet-based web-app sometimes fails to close Log4j log files when redeployed, leaking to file descriptor leakage and occassionally leading to servlet-contained dying from 'too many open files'.
I have a ContextListener, what should I put into its contextDestroyed() to tell log4j to shut down and release all resources?
Quick skim o...
I'm currently writing a Java app that interfaces with a MySQL database.
My problem is that I'm trying to write a function that fills a JComboBox with the unique year-values registered in the database.
I could use UNIQE on the date-field in the SQL query, but that would only exclude some of the dates, not all-but-one-date-per-year.
Any he...
I am getting the follwing error frequently while retriving file object from database cloumn. i referred many forums. but not able to find out the solution. how to resolve this problem. it is very urgent. help me.
May 8, 2009 3:18:14 PM org.apache.catalina.core.StandardHostValve status
WARNING: Exception Processing ErrorPage[errorCode=...