Any one knows how to get data source which is located in was 6.0 from a standalone application? What are the required jar files? Currently I encounter such an exception: Error in lookup a datasource :javax.naming.NamingException: Failed to initialize the ORB [Root exception is org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.rmi.iiop.ORB vmcid: 0x0 minor code: 0 completed: No]
It really shouldn't, and even if it did. Doing a remote lookup to get a DataSource then using one of the connections from the connection pool, which means it has to be sent down to the client, isn't really a thing you want to do. If you have to have the client accessing the database directly, then just create a Connection on the client side.
Otherwise, I encounter a new problem when getting connection from data source:
Configuration: WAS 6.0 have a Component-managed authentication alias and select it in data source(Test connection is ok) the data source seems belong to the server (cell:node:server) JDBC Implementation class name: oracle.jdbc.xa.client.OracleXADataSource
Pls note: calling dataSource.getConnection() has such problem (it is ok in weblogic), dataSource.getConnection("username", "password") is ok, but we don't want to hardcode them in source code. Thanks in advance!
The history is that we have a complete online application, and this standalone app one is the seperate part which will gather information from database scheduledly. The two ones are running on the same machine.
It has existed when I touched it, maybe its positive aspect is to hide username/password and control the total number of connections, but connection to db seperately should seems more clear structure and independent, but how to control the total number of connections since there is no pool. If there is some problem in scheduled job which will call standaline app, maybe there will be a lot of connections. I'm not clear about the balance, could you clarify your point of view about it? Thanks!
FIrst, there are connection pool apis out there. Look at C3PO as an example. It actually comes bundled with Hibernate for use in Stand-Alone applications. Hibernate requires there to be a connection pool.
Also, if it is a Stand-Alone application means to me at any point there can only be one user on the client side, so they only need one connection anyway. Now if there is some part that creates seperate threads and each one needs to talk to the database, then maybe, maybe then I can see using more than one connection at the same time. But I would question that architecture too.
Mike Server.....Regarding your post about "Otherwise, I encounter a new problem when getting connection from data source:". Did you ever find a solution? I have same exact problem. The funny thing is that I've configured this same data souce on many other machines and other server instances many times with out any issues. So I'm not a newbie at this. Any help would be appreciated. Thanks