1.public Connection getConnect()
{
try
{
Properties parms = new Properties();
parms.setProperty("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(parms);
DataSource ds = (DataSource)ctx.lookup("jdbc/connectoracle");
conn = ds.getConnection();
}
catch(Exception e)
{
System.out.println(e.toString());
}
return conn;
}
//What's the goal of these coding?
{
try
{
Properties parms = new Properties();
parms.setProperty("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(parms);
DataSource ds = (DataSource)ctx.lookup("jdbc/connectoracle");
conn = ds.getConnection();
}
catch(Exception e)
{
System.out.println(e.toString());
}
return conn;
}
//What's the goal of these coding?