I have a portal for a bookstore deployed in one BEA WebLogic Server, and a provider(books provder) in another Weblogic server.The portal tries to call, the methods in the Provider, by sending request string through RMI.

The provider receives the message from the portal, and using this message the provider should contact its own database to get the results.


The provider actually receives the message and no issues on that.

But for some reason, the communication with the database from the provider fails becuase, the portal's username is being used to access the provider's database.

Is there a way to stop the use of the Portal's username and use the Provider's username?

Any help appreciated.

Thanks,
Dev
-----------------------------------------
The error messages I am getting in the provider side are,










javax.ejb.FinderException: Exception in findByBookName while preparing or executing statement: 'weblogic.jdbc.wrapper.PreparedStatement_weblogic_ jdbc_rmi_SerialPreparedStatement_weblogic_jdbc_rmi _internal_PreparedStatementStub_weblogic_jdbc_rmi_ internal_PreparedStatementImpl_weblogic_jdbc_wrapp er_PreparedStatement_com_mysql_jdbc_PreparedStatem ent_812_WLStub@1e'
java.sql.SQLException: Syntax error or access violation, message from server: "SELECT command denied to user 'db1169'@'bea2.cs.txstate.edu' for table 'ls1372catalogentityremotes'"
java.sql.SQLException: Syntax error or access violation, message from server: "SELECT command denied to user 'db1169'@'bea2.cs.txstate.edu' for table 'ls1372catalogentityremotes'"
at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:138)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl_w eblogic_jdbc_wrapper_PreparedStatement_com_mysql_j dbc_PreparedStatement_812_WLStub.executeQuery(Unkn own Source)
at weblogic.jdbc.rmi.internal.PreparedStatementStub_w eblogic_jdbc_rmi_internal_PreparedStatementImpl_we blogic_jdbc_wrapper_PreparedStatement_com_mysql_jd bc_PreparedStatement_812_WLStub.executeQuery(Unkno wn Source)
at weblogic.jdbc.rmi.SerialPreparedStatement_weblogic _jdbc_rmi_internal_PreparedStatementStub_weblogic_ jdbc_rmi_internal_PreparedStatementImpl_weblogic_j dbc_wrapper_PreparedStatement_com_mysql_jdbc_Prepa redStatement_812_WLStub.executeQuery(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.executeQue ry(PreparedStatement.java:80)
at Project.ejbs.ls1372CatalogEntityEJB_6n3rre__WebLog ic_CMP_RDBMS.ejbFindByBookName(ls1372CatalogEntity EJB_6n3rre__WebLogic_CMP_RDBMS.java:963)