Well, I have a class Customer (no base class).
I need to cast from LinkedList to List. Is there any clean way to do this?
Just so you know, I need to cast it to List. No other type will do. (I'm developing a test fixture using Slim and FitNesse).
EDIT: Okay, I think I need to give code examples here.
import java.util.*;
public clas...
We are considering using ehcache (1.6.0-beta5) to enable second level caching of a number of tables which are never modified. We have set up a read-only ehcache region for this table and currently it seems to be working fine. The Hibnerate POJOs stored in the cache are all immutable.
One of the developers here raised an issue that the...
I have an application that uses WebSphere MQ Java API along with a configuration (xml) file to access MQ. I would like to migrate to WebSphere JMS API. For this i try creating
1) WebSphere MQ Queue Connection factory and 2) WebSphere MQ Queue destinations from my local WAS. When i configure my Queue destinations and try to set my MQ Con...
How do I insert elements of different data types into a single stack in Java?
...
Hello, I'm having a little problem with using conditionally evaluated expression in jsf/a4j
Here's my code
<a4j:form>
<h:inputText id="id1" value="#{mybean.myvalue}" size="1"
required="#{not mybean.condition}"
rendered="#{not mybean.condition}"
requiredMessage="Put a num...
Over the int type?
A lot of code either uses int with double/floats.
I know there is the likes of .NET mobile versions so byte/short comes into their own but for desktop apps is there any point?
When I did C++ work (Games programming) I was very aware of each data type I was using though I don't have this feeling in C#/Java work.
Wou...
Hello!
I am trying to integrate a Hibernate application into a proprietary framework. My problem is that this framework somehow checks the signature of packages. When I try to call my Hibernate application I get the following error:
Caused by: java.lang.SecurityException: class "org.hibernate.dialect.Oracle10gDialect"'s signer infor...
Hi Everyone!
Sometimes when i see my logging code i wonder if i do it right. There might be no definitive answer to that, but i've folling concerns:
Library Classes:
I have several library classes wich might log some INFO messages. Fatal Errors are reported as exceptions. Currently i have a static logger instance in my classes with the...
I'm configuring JPA to work with SQLite db, with hibernate as the provider. I map a single pojo to a table, no fk's,just plain simple for now. I'm using a SQLDialect I found on the internet.I get this stacktrace, when I try to initialize my application:
java.sql.SQLException: SQLite supports only TRANSACTION_SERIALIZABLE
at org.sql...
I have the following on my log4j.properties
log4j.rootLogger = debug, stdout, fileLog
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.fileLog = org.apache.log4j.RollingFileAppender
log4j.appender.fileLog.File = C:/logs/services.log
log4j.appender.fileLog.MaxFileSize = 256MB
log4j.appender.fileLog.MaxBackupIndex...
Hi,
I have developed a jersy Resource class. Can someone please tell me how can i deploy it on a web/app server. Preferebly tomcat or jboss.
Or a better question still, can jersey applications with only a resource class be deployed on a web/app server? If yes, How?
Adhir
...
I have this in activemq config
<sslContext>
<sslContext keyStore="file:/home/alex/work/amq/broker.ks"
keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts"
trustStorePassword="password"/>
</sslContext>
I have a pair of x509 cert and a key file
How do I import those two to be used in ssl and ssl+st...
Hi I am trying to implements a simple Java NIO server; which registers the socketChannel with the selector. Hence I wish to listen to client and send some response back. After the socketChannel is registered with the selector, even if client(non NIO) sends some data, Server is not able to read; howerver the key generated is still being i...
What's the best way to return a Java Map using the JSON format?
My specific need is a key -> value association between a date and a number.
My concern is this: My structure basically contains N elements of the same type (a mapping between a date and a number), and I want to be able to quickly iterate through them in Javascript.
In XML,...
My question is broader than merely expanding language specific skills. I'm wondering what sort of advice anyone might offer to someone with a desire for knowledge, but a lack of direction. Feel free to skip down to the question.
Background: I've taken a single computer science course in java at my University, but i'm planning on majorin...
I'm trying to run jstack command on my java application. Application is rather big, running inside jboss AS occupying about 4gb of memory. OS is Windows Server 2003 Standard edition. Every time i get an error "Not enough storage is available to process this command". There is enough ram, 16gb, and disk space. So, any ideas?
...
(note: I'm quite familiar with Java, but not with Hibernate or JPA - yet :) )
I want to write an application which talks to a DB2/400 database through JPA and I have now that I can get all entries in the table and list them to System.out (used MyEclipse to reverse engineer). I understand that the @Table annotation results in the name...
I'm using Java and XStream to parse a google geocode request over http. My idea is to have an Address class with all the geocode attr's (ie. lat/long, city, provice/state etc) but I'm having problems parsing the xml with xstream.
The google response is similar to this:
<?xml version="1.0" encoding="UTF-8" ?>
<kml xmlns="http://earth.g...
I am looking for an editor/comparator for i18n property files that would help me keep different language files in sync.
Basically, something that would compare a bunch a of property files and show which keys are not present in a particular language.
a property would look something like
component.titlepage.title = hello world
A simpl...
How do you get Hours and Minutes since Date.getHours and Date.getMinutes got deprecated?
Note: The examples that I found in google search used the deprecated methods.
Thank you.
...