Server-Side Development Section Index | Page 3
How do I create a stateless session bean with EJB 3.0?
How do I create a stateless session bean with EJB 3.0?
How do I use the @PrePassivate annotation in EJB 3.0?
How do I use the @PrePassivate annotation in EJB 3.0?
How do you implement ejbCreate, ejbRemove, ejbActivate and ejbPassivate in EJB 3.0?
How do you implement ejbCreate, ejbRemove, ejbActivate and ejbPassivate in EJB 3.0?
When was Java EE 5 released?
When was Java EE 5 released?
How do I find out if my database supports row ids?
The Java 6 DatabaseMetaData class has a getRowIdLifetime() method that returns a RowIdLifetime, which has an enumeration of possible values:
ROWID_UNSUPPORTED
ROWID_VALID_FOREVER
ROWID_VALID_SESS...more
How do I load a database driver with JDBC 4.0 / Java 6?
Provided the JAR file containing the driver is properly configured, just place the JAR file in the classpath. That's it. No need to manually load the class or register the driver.
How do I loop through all the causes of a SQLException?
You can call the getCause() method of the exception repeatedly
try {
...
} catch (SQLException sqle) {
for(Throwable t : sqle) {
System.out.println("Throwable: " + t);
Throwable ca...more
How do I loop through the causes of a SQL Exception?
You can repeatedly call getCause() of the SQLException:
try {
...
} catch (SQLException sqle) {
for(Throwable t : sqle) {
System.out.println("Throwable: " + t);
Throwable cause = t...more
How do you access the SQL row ID?
Using ROWID as the column name in the query, you can use the Java 6 getRowId(columnNum) method.
How do you allow a PreparedStatement to be pooled?
The PreparedStatement has two methods in Java 6, isPoolable() and setPoolable(), so you can now request if a PreparedStatement can be pooled or not.
more
How do you check if a Connection hasn't been closed and is still valid?
See the new isValid() method of Connection, added in Java 6.
I'm having problems using POP3 JavaMail with the Microsoft Exchange Server. What do I have to do to fix this?
If your version of Exchange doesn't implmenet POP3 properly, you need to tell JavaMail to forget about TOP headers by setting the mail.pop3.forgettopheaders property to true.more
Using Java 6, how do you loop through the causes of a SQL Exception?
The SQLException class is now Iterable in Java 6.
try {
...
} catch (SQLException sqle) {
for(Throwable t : sqle) {
System.out.println("Throwable: " + t);
}
}
more
What configuration options do I use to connect to gmail/Google from JavaMail?
Google offers the configuration options at http://mail.google.com/support/bin/answer.py?answer=13287.
What's the difference between a transient and non-transient exception?
Subclasses of SQLException have two types, transient and non-transient.
Transient exceptions are those that when retried could succeed without changing anything.
Non-transient exceptions are tho...more