Thursday, March 3, 2016

Re: Regarding RpcService,HybridServiceServlet and ClientOracle

Hi Thomas,

                                    As my English is bad, I do not know if I understand your problem, however, I use GWT from version 1.x and never had a problem with the relationship between and the oracle. Here's how to work:

public class Cadastro extends XsrfProtectedServiceServlet implements DBService {

    public void SQLDireto(){
        OracleResultSet result = null;
        OracleCallableStatement executarOC = null;
        OraclePreparedStatement executarOP = null;
        ds = new ConexaoDS();
        executarOC = (OracleCallableStatement) ds.getComunicacao()
                .prepareCall("operation DML");
        executarOC.registerOutParameter(1, OracleTypes.CURSOR);
        executarOC.execute();
        result = (OracleResultSet) executarOC.getObject(1);
        // read result and return
    }   
   
public final class ConexaoDS {

    private Connection conexao;

    public ConexaoDS(String conexao) throws NamingException, SQLException {
        Context lContext = new InitialContext();
        Context envCtx = (Context) lContext.lookup("java:/comp/env");
        OracleDataSource ds = (OracleDataSource) envCtx.lookup(conexao);
        this.conexao = ds.getConnection();
        this.conexao.setAutoCommit(false);
    }

    public Connection getComunicacao() {
        return this.conexao;
    }

}

Natan.

Em 03/03/2016 13:06, MANTU KUMAR escreveu:
Hi Thomas,

  I want to ask one thing that ClientOracle is in deRPC and deRPC has been removed from 2.7 then instead of ClientOracle what is using in GWT 2.7 and What is the use of ClientOracle?. and in my existing application which is GWT 2.0.3, i have used two method processCall(ClientOracle clientOracle,String payload,OutputStream stream) and processCall(String payload) so, what is use of two methods in GWT 2.0.3?

On Thu, Feb 25, 2016 at 4:08 PM, Thomas Broyer <t.broyer@gmail.com> wrote:


On Thursday, February 25, 2016 at 8:19:16 AM UTC+1, mant...@gmail.com wrote:
Hi Thomas,

    I am new in GWT and I have to migrate version GWT 2.0.3 to GWT 2.7  but In GWT 2.0.3 , GWT-RPC is there and in  GWT 2.7,GWT-RPC is not there. So,How can I resolve the RPC Related issue in GWT 2.7. When I migrated older version(2.0.3) to Higher version(2.7) then I am getting error like RpcService,HybridServiceServlet and ClientOracle. In my existing Project RPC has used that's why I am migrating GWT 2.7 then These errors are coming like   
RpcService,HybridServiceServlet and ClientOracle. So,If RPC is not there in GWT 2.7 then what is present in GWT 2.7 which resolve the Rpc related issue and also confirm me that RPC is available in GWT 2.7 or not.

Please re-read my previous mail, and possibly go read the documentation at http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html
RpcService, HybridServiceServlet and ClientOracle were part of "Direct-Eval RPC" (aka deRPC), which was experimental and discouraged for use in production.
deRPC has been removed in 2.7, but GWT-RPC is still there. deRPC and GWT-RPC are (were) two different things; deRPC aimed at being a "better GWT-RPC" and replacing it, but it failed, so GWT-RPC is still there and deRPC has been retired.

Migrating (back) to GWT-RPC should hopefully be as easy as switching RpcService and HybridServiceServlet (and/or RpcServlet) to RemoteService and RemoteServiceServlet respectively; and remove the <inherits name="com.google.rpc.RPC"/> from your gwt.xml.
You're talking about ClientOracle though, which means you possibly had some customization on top of the "out-of-the-box" deRPC, so migration *might* not be that easy (depending on the kind of customization you have).
Last, but not least, there must have been a reason to use the experimental deRPC over standard GWT-RPC, so maybe switching (back) to GWT-RPC might not be the solution for your case, but it's impossible to say without more information. If you don't know the reasons for using deRPC either, I'd suggest, given how easy it should be, to move (back) to GWT-RPC and see if that works. If it doesn't work, then I'm afraid you'll have to put quite some work in either "making it work", or migrating to something else entirely (e.g. JSON-RPC, or JSON-based RESTful services).
 



On Tuesday, February 23, 2016 at 4:27:16 PM UTC+5:30, Thomas Broyer wrote:


On Tuesday, February 23, 2016 at 11:47:25 AM UTC+1, mant...@gmail.com wrote:
Hi All,

I am upgrading GWT 2.0.3 to GWT 2.7 then I am facing a lot of problem like RpcService , HybridServiceServlet and ClientOracle error. can someone tell  me RpcService, HybridServiceServlet  and  ClientOracle is not available then what is available instead of that in GWT 2.7?

com.google.gwt.rpc (aka Direct-Eval RPC, or deRPC) was experimental (the javadoc used to state "EXPERIMENTAL and subject to change. Do not use this in production code."), and didn't fulfill its expectations, so it was removed in 2.7.0-RC1.
You have to migrate to com.google.gwt.user.*.rpc ("standard" GWT-RPC), or if that was a problem (that made you use deRPC in the first place), then migrate to RequestFactory or an entirely different protocol (JSON-RPC, or some JSON-based RESTful protocol for example).
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment