Hi everyone!
I'm using this snippets to initialize my connection to database
through Glassfish admin console
        Connection conn = null;
        try {
            Context jdbcContext = new InitialContext();
            DataSource ds = ((DataSource) jdbcContext.lookup("jdbc/COP"));
            conn = ds.getConnection();
        } catch (Exception e) {
            System.out.println(this.getClass() + " - " + e.toString());

However, I cannot use that snippet to pass and receive parameter Object ARRAY to my Stored Procedure..
(I cannot pass and receive in web apps, but in simple experiment with public static void main, i
can pass and receive parameter array. maybe its because of the Http Template that we're using).

In my experiment, i can only pass and receive parameter array in stored procedure through OracleDataSource,
OracleConnection and using OracleCallableStatement..
below is my code using OracleDataSource.. (In web application)

    public OracleCallableStatement callable;
    public OracleConnection connection;
    public OracleDataSource dataSource;
    public void connect() {
        try {
            dataSource = new OracleDataSource();
            connection = (OracleConnection) dataSource.getConnection();
        } catch (SQLException ex) {
            Logger.getLogger(DBConnection.class.getName()).log(Level.SEVERE, null, ex);

using that snippet, i can now pass and receive parameter array to Stored Procedure.

Is there a way to initialize connection without using setUrl, setUser, and setPassword?
Just like in my first snippet using Context and DataSource?
Well, i cannot do this:
Context jdbcContext = new InitialContext();
OracleDataSource ds = ((OracleDataSource) jdbcContext.lookup("jdbc/COP"));
because it makes an exception when i debug it..
Please Help
Thank you so much for your time..

I'm not the only one whose developing the project, and i'm not the boss.. ehehehe
so i cannot simply make changes. So it means that i cannot simply use
the 2nd snippet that i posted.
Thank you so much