Trigger function when Undeploying application
How do I automatically trigger Java function to stop Quartz scheduler jobs when I deploy/undeploy/redeploy JEE5 application in Glassfish. ...
How do I automatically trigger Java function to stop Quartz scheduler jobs when I deploy/undeploy/redeploy JEE5 application in Glassfish. ...
EDIT: After fixing a few issues, the bigger issue that I am having is being caused by Apache POI which I am using. I am working on figuring that out now. Apparently it is being restricted by the Sandbox. I'm very new to Swing, and created a small Swing app that I now need to have run via web start. I'm trying to use the FileOpenService ...
my sql server instance name is MYPC\SQLEXPRESS and I'm trying to create a jTDS connection string to connect to the database 'Blog'. Can anyone please help me accomplish that ? I'm trying to do like this: DriverManager.getConnection("jdbc:jtds:sqlserver://127.0.0.1:1433/Blog", "user", "password"); and I get this: java.sql.SQLExcepti...
Hi, i am wondering which book is best for starting Java development for a desktop app. I have extensive experience in AS3, PHP and also now OOP from Java (back in the University time). But now I need to develop a desktop based app which was previously written in Delphi. Now a little Swing, but want to have a good book to show me the wa...
I work on a code base that is ... messy. One aspect of this messiness is that we have a ton of methods whose signatures no longer match the associated Javadoc. For instance: /** * * @ param foo */ public void doFoo(int bar) {... I'm no fan of generated Javadoc (as it's almost always worthless), but I really could use a tool that ...
I am an undergraduate student. I was exposed to basic programming couple of years back in school. Till now I have an understanding of Core Java, Core Python and basic C and C++. Every time I start off with some GUI programming so as I can start off with a project of mine, I get boggled by the sheer amount which is to be done, API to be ...
Hi, I am new in Java EJB 3.0. It is possible to call a (session) beandeployed on JBossfrom a desktop application client? Thanks in advance. ...
Need some help on understanding how to do this; I'm going to be running recursive 'find' on a file system and I want to keep the information in a single DB table - with a self-referencing hierarchial structure: This is my DB Table structure I want to populate. DirObject Table: id int NOT NULL, name varchar(255) NOT NULL, par...
Is there a way to add a JMenuItem (or similar button-type object) to a JMenuBar? Adding a JMenuItem doesn't play well with the layout of a JMenuBar, and buttons look too button-like. Should we be tweaking the button to look like a JMenuItem or tweaking the JMenuBar to display the JMenuItem correctly? Or something else altogether? ...
Currently I am using Websphere Admin console to update a war. I do the following three steps stop the application update start the application As a part of the second step I am using the following option. I select the war from the local file system. This step takes around 10 minutes to complete. I wanted to know weather it is the...
In the Observer design pattern, the subject notifies all observers by calling the update() operation of each observer. One way of doing this is void notify() { for (observer: observers) { observer.update(this); } } But the problem here is each observer is updated in a sequence and update operation for an observer might no...
I've observed the strange fact (based on the questions in the hibernate tag) that people are still actively using xml files instead of annotations to specify their ORM (Hibernate/JPA) mappings. There are a few cases, where this is necessary: you are using classes that are provided, and you want to map them. you are writing an API, who...
Is it possible to capture the close tab event for a JTabbedPanel in Java Swing. I want to check for some conditions and if they are not met, then I have to prevent the user from closing it. Thanks! Update: I created a custom event, based on this code and it solved my problem. ...
i need to read some error message in java, i tried to do this in getErrorStream and then readLine, but i got exeption. i added a link to a picture of the error message i want to read http://yfrog.com/0986806495p TNX ...
Hi, I was wondering if there was an easy way to serve GZipped content with Java Servlets. I already have the app up and running so the modifications needed should be too heavy. I have access to the response object just at the end of the doPost/doGet method, so I'm looking for something like response.setGzip(true); It doesn't have to...
Hi, I have a Java client for a session bean, I want to send it an inputStream as following: Note: I am working with EJB 3.0 public class SenderSimulator { public static void main(String[] arg){ Properties p = new Properties(); p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); p.put("java.naming.provid...
I've defined VARRAY of a user-defined type such as this : CREATE OR REPLACE TYPE TEST_T AS OBJECT (C1 VARCHAR2(20 BYTE), C2 VARCHAR2 (11 Byte)); CREATE OR REPLACE TYPE ARRAY_TEST_T AS VARRAY(200) OF TEST_T; Is it possible to create a java stored function/procedure that accepts VARRAY or user-defined type as IN parameter ? If it...
Hi Is there a possibility to read out the TCP "MSS" option header of a Connections SYN packet or is this buried too deep in layers of layers of layers ? Thanks ...
I'm looking for an XPath evaluator that doesn't rebuild the whole DOM document to look for the nodes of a document: actually the object is to manage a large amount of XML data (ideally over 2Gb) with SAX model, which is very good for memory management, and give the possibility to search for nodes. Thank you all for the support! For all...
I've run into Java code similar to the following: public interface BaseArg { } public class DerivedArg implements BaseArg { } public abstract class Base <A extends BaseArg> { A arg; void doIt() { printArg(arg); } void printArg(A a) { System.out.println("Base: " + a); } } public class Derived extends Base<DerivedArg> { ...