Latest Entries »

Wednesday, March 11, 2009

Add new custom themes to your iPhone

Here are some instructions on how to get themes onto your iPhone.If a theme is not available through the installer, you will have to add it manually yourself. First, you will need to use the installer.app and install OpenSSH on your iPhone. You will then need to install WinSCP on your computer. To connect to WinSCP you will need to go into your settings on your iPhone into Wi-fi, click on the little arrow next to the Wi-Fi you are connected to and get the ip address. Now open WinSCP on your computer….the Host Name is your ip address (with the periods) the user name is root and the password is alpine. Don't worry about the Private key file, you don't need to put anything there. Hit login.








Once WinSCP opens, the themes go into the var/root/library/SummerBoard/Themes folder. Once you are in that folder you will see all the themes that are on your iPhone. This is where you will want to add your new themes.

Create a folder somewhere on your computer that is the title of the theme you would like to add (ex…Chalkwork) then inside of the Chalkwork folder create another folder called Icons (with a capital "I"). Inside the Icons folder put all of the icon images that you would like to have. They must be named the same as the Title of the app, starting with a capital (Ex…Calendar, Customize, SummerBoard, Photos, Stocks….). You can also add a Dock and Wallpaper to the Chalkwork folder, they also need to be capitalized (do not put them in the Icons folder…just in the main Chalkwork folder). Once you have a folder of the theme with a folder of icons inside it you just drag the whole folder, Chalkwork, into Themes on WinSCP and hit Copy. Once it is done transferring you can go on your iPhone into SummerBoard and select the theme you just added. Note: your iPhone has to be on for the file to transfer!

If you are downloading a theme that is in a zip file…you will have to open the zip file and then create a folder on your computer that is the same name as the theme you are trying to download. Then copy the Icons folder from the zip file into the folder you created on your computer. This unzips the file so that you can add it to SummerBoard through WinSCP. You can also copy the wallpaper and dock out of the zip file into the file you created if you would like them too.

Thursday, March 5, 2009

Apache Tomcat 6.0 JNDI Datasource

Configuration of JNDI

1. Create context.xml file in META-INF folder.











2. Create an entry for resource-ref in web.xml.











3. Make sure that the following JAR's added in your TOMCAT/lib
( C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.18\lib )
a. commons-collections-3.2.jar
b. commons-dbcp-1.2.2.jar
c. commons-pool-1.4.jar




















Note: for mysql add mysql-connector-java-5.1.5-bin.jar in TOMCAT/lib and for as400 add jt400.jar etc...









Java Code:
/*===========================================================================+
| Copyright (c) 2009 Sravan Modugula, |
| All rights reserved. |
+===========================================================================+
| HISTORY
| Created By : Sravan Modugula
| Date : 12-10-2008
| Description: class represents As400Connection
|
+===========================================================================*/

package com.sravan.modugula.as400database;

import java.sql.Connection;
import java.sql.SQLException;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

import org.apache.log4j.Logger;

public class As400Connection {

/**
* logger instance
*/
private static final Logger log = Logger.getLogger(As400Connection.class);

public static Connection getConnection() {
log.info(" Starting establish as400 connection");

Connection as400Connection = null;
try {
Context ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx
.lookup("java:comp/env/jdbc/databaseAS400");
if (dataSource != null) {
as400Connection = dataSource.getConnection();
return as400Connection;
}
} catch (Exception e) {
e.printStackTrace();
log.fatal("Got Exception when getting as400 connection");
log.fatal("Exception is ", e);
}
// log.info(" ConnectionPtest Ending"+System.currentTimeMillis()/1000);
return as400Connection;
}

public static void closeConnection(Connection as400Connection) {
try {
if (as400Connection != null) {
as400Connection.close();
as400Connection = null;
}
} catch (SQLException e) {
log.error(e.getMessage(), e);
} finally {
if (as400Connection != null)
try {
as400Connection.close();
log.info("Closed connection");
} catch (SQLException e) {
log.error(e.getMessage(), e);
}
}
}

}