Quantcast
Channel: Sud's Blog
Browsing latest articles
Browse All 12 View Live

JDBC via JNDI

// define sql queryString sql = "select firstname from users";// initialize database connection objectsConnection conn = null;Statement stmt = null;ResultSet rs = null;// get JNDI JDBC...

View Article



Scripting FTP in BASH

The following code snippet can be embedded in a bash script to ftp a file or script other ftp functions. It also includes error checking if the ftp of the file fails.function ftpfile { # failure or...

View Article

GlassFish + JNDI + LDAP + JAVA

STEP 1: Create JNDI LDAP ResourceIn the GlassFish admin console create a JNDI Custom Resource with the following parameters:1. Give it a JNDI name such as myLDAP2. Resource Type:...

View Article

EJB 3.0 + Glassfish + JPA + Eclipse

Follow instructions here to create the EJB project in eclipse.http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.htmlCreate the jdbc connection pool and the corresponding resource via the...

View Article

Standalone EJB 3.0 client for remote EJB server

In order for a client to connect to your remote GlassFish server you need to add a second IIOP listener with the hostname listening at a different port (ex: 3701). You can do this via the GlassFish...

View Article


Article 6

Set the Application Server > Logging > Log Levels > Deployment > Debugging to FINE to quickly troubleshoot deployment issues in Glassfish

View Article

Programmatic Login to Authenticate Against a EJB in Glassfish

What?This is the method used to authenticate a standalone java client (including Eclipse RCP plugins) to the Glassfish EJB...

View Article

Hello World! REST web service using Jersey and Glassfish

Recently I had the need to expose some EJB application functionality to a client PHP application. I wanted to avoid the heavy weight SOAP protocol and REST seemed like a good choice. Wanting to stay...

View Article


Log4j and MySQL

When configuring log4j with an appender to log to a MySQL database there are some nuances you might need to be aware of.First, here is what the relevant settings in the log4j.properties file should...

View Article


One reason a Rails application breaks with no error message

I'm new to Ruby and Rails and spent about 3 hours trying to figure out why objects of my Purchase model which references my Transaction model weren't being presisted. Rails would say that the object...

View Article

Bash command completion

If you cannot live without command completion in the linux shell, check this out...you can even get completion working for command arguments!! I was pretty thrilled to learn about this.See the debian...

View Article

Eclipse WTP missing in Pulse Catalog

If you use pulse to manage your local eclipse installation (if not, you should check it out) the Galileo profiles are slightly different from Ganymede. Previously you could add WTP to your profile. But...

View Article
Browsing latest articles
Browse All 12 View Live




Latest Images