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();
            conn.setAutoCommit(false);
        } catch (Exception e) {
            e.printStackTrace();
            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();
            dataSource.setURL("jdbc:oracle:thin:@10.123.4.21:1525:FMSDEV");
            dataSource.setUser("COPDEV");
            dataSource.setPassword("COPDEV!1018");
            connection = (OracleConnection) dataSource.getConnection();
            connection.setAutoCommit(false);
        } 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.

HERE IS THE QUESTION:
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