I'm using the same source code for a GWT 1.5 and GWT 1.7 application.
I'm wondering is there a way to conditionally compile parts of the java code for one or the other version.
I know there is a way to do it for widgets and browsers in the module XML file.
...
Application Server: JBOss 4.2
I have a method which I want to intercept.Its a method annotated @Timeout and invoked by javax.ejb.TimerService instance.
The method signature:
@Stateless
class A
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@Timeout
@Interceptors(AnInterceptor.class)
public void ...
i am trying to run the sample program which comes with google data api.I am geting a run time error at following line
YouTubeService myService = new YouTubeService("gdataSample-YouTube-1");
erroe is as follows :
run:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at com.google.gdata.w...
I want to a project build path (default is src...). Can I do it using some java API?
...
Hello,
I am not a beginner in hibernate, but I am a beginner in working with Hibernate in Spring. I read the book Spring in Action. So I wrote a small application to comprehend the examples in the book. Here an extraction of my application. I can give you more, if you want.
@Transactional(propagation = Propagation.SUPPORTS, readOnly = ...
I have a problem where I get a deadlock on a MS SQL Server. The same code runs without problems on MySQL.
My problem is that I receive a request to delete a job (which is attached to a device), and afterwards I receive a request to create a new job for the same device. Most times this works without any problems, but once in a while the ...
Feels like Im about to reinvent the wheel. Im having a message payload (e.g. from a client through a socket) in XML format (in a simple java.lang.String).
Below is an example what the payload could look like:
<update>
<type>newsource</type>
<sources>
<source>vedbyroad box 1492</source>
</sources>
</update>
I want to...
Does the Java provide some sort of registry- or cookie mechanism where I can store small pieces of data to load next start I start an java application- or applet?
For example the application settings such as last opened file etc
...
Hi all
I'm using a oracle thin driver to connect to my database.My database links to another db(DB2) with drda specification.My problem is that I can only view the local tables of my database and map them using jpa but I select from drda in sqldeveloper and it works so the problem is definitely with my application development.What do yo...
Is there a way to monitor folders in java to see when they are updated, ie file created, deleted, renamed,etc. And also is there any way to set it that it only looks for files that begin with a certain prefix, ie img?
...
Hi,
I'm trying to configure sitemesh to only take effect for a certain subset of action mappings in my Struts 2 application.
Say for example, I have the following struts.xml snippet:
<package name="default" namespace="/" extends="struts-default">
<action name="showForm">
<result>/view/form.jsp</result>
</action>
</package>
<pa...
I'm a bit confused about the way Java treats == and equals() when it comes to int, Integer and other types of numbers. For example:
Integer X = 9000;
int x = 9000;
Short Y = 9000;
short y = 9000;
List<Boolean> results = new ArrayList<Boolean>();
// results.add(X == Y); DOES NOT COMPILE 1)
results.add(Y == 9000); ...
I'm profiling a Java program that is leaking memory. Using JProfiler I see I get crazy amount of byte[] data. Is there a way to know more information about it? When is it allocated/created, where is it?
...
I would like an automated web tests suite based on Selenium RC to take screenshots of pages when some errors are encountered. The test suite is a part of the continuous integration process and technically is executed by CruiseControl running as a Windows service.
The selenium.captureScreenshot() method is called to trigger the actual s...
I have current have two UI components used to specify a date and a time. Both components return java.util.Date instances representing the calendar date and time respectively. My question is:
What is the best way to combine these values to create a java.util.Date instance representing the date and time? I would like to avoid dependenc...
I want to add a xml file to my Java ee project and use it in my code but when I address the file from src directory it does not understand my address and search for file in bin directory of tomcat.
My project is using wicket framwork and JavaEE.
does any one know how to address the file or where should I place the file to access is from ...
Relating to a previous question, how let OSGi to reuse your configuration via Config Admin, I am still trying to solve this problem in the Equinox Framework.
Pavol Juhos wrote:
Equinox Config Admin (org.eclipse.equinox.cm) stores the configuration data in the persistent storage area provided by the Framework. And that happens to be ...
I'm trying to set the background of a webview to a drawable image resource in Android.
From the sdk it seems something like this would work but it doesn't.
WebView web = (WebView) findViewById(R.id.webView);
web.setBackgroundResource(R.drawable.backgroundmain);
web.loadData(profile, "text/html", "UTF-8");
Any idea's?
...
Hello everyone, I'm a developer pretty much experienced in web development (HTML, JavaScript, PHP, Django, Ruby on Rails). I have just recently taken on Java (read "Core Java" and the SCJP 6 book) and I now want to start with J2EE. I need a book that will go through the most important aspects (EJB/JSF/etc., I know the buzzwords :) ) of ...
A recruiter has sent me a fairly long quiz from an employer, and I think it's a bit excessive for what is supposedly a Senior Java developer role. The questions (to me) seem unfocused, and go into areas such as architecture, operations, capacity planning. One of the questions is this:
"Internet-scale applications must be designed to pro...