View RSS Feed


GlassFish open source application server

  1. ThreadLocal

    by , 10-29-2011 at 08:36 PM (My Java Tips)
    I will present an example that shows how to start, stop, suspend, and resume threads.

    It uses the Runnable interface because it extends from Applet class and multiple inheritance is not allowed. This example uses a thread that counts and prints a string every second. The thread starts when the applet is initialized. It continues to run until the user leaves the page. If the user returns to the page (and all is well), the thread continues from where it left off. This allows applets ...
    Glassfish , Java SE
  2. Enabling Debugging

    by , 10-25-2011 at 08:08 PM (My Java Tips)
    There are different ways to enable debugging in Glassfish. Let's start with enabling debugging using administration console.

    To enable debugging follow the following after each server restart:

    - Login to the Administration Console using web browser:
    For example:http://localhost:4848/asadmin

    - Go to the Application Server page.

    - Select the JVM Settings tab and the General option.
  3. Wrapping JDBC Objects

    by , 05-25-2011 at 10:55 AM (My Java Tips)
    In Glassfish connection pool has a property called "Wrap JDBC Objects" which can have value true or false. You may define it in domain.xml file.

    This property is defined as: "When set to true, application will get wrapped jdbc objects for Statement, PreparedStatement, CallableStatement, ResultSet, DatabaseMetaData".

    If you follow JDBC specifications, you will be see that obtaining connection using DataSource.getConnection() or other objects like ...