Skip to Content
author's profile photo
Former Member

How to use JCo Provider Service w/Sneak Preview and Test Drive

I have both SAP Web AS Sneak Preview (6.40) and MiniWas 6.20 Test Drive installed on a single system. I have implemented a Java server program which can be RFC called from an ABAP program using JCO.

The only disadvantage to this process is that I must manually run the server program each time I bring up the J2EE system.

I would like to set things up so that when I start the WebAS 6.40 J2EE system, the server function can be automatically registered (if I'm using the correct terminology - not at all sure about that...). It looks to me that I should be able to use JCo Provider Service to do what I want to do, but I don't know how to do any of the session bean creation and I esp. can't seem to find out how to run the J2EE Visual Administrator, which the documentation I've found leads me to believe needs to be used.

Is there a tutorial, or example, that will lead me through this entire process? I have the ABAP calling program working OK, and I have the Java JCo server program working ok - I just want to create something in Java that will operate like a good old C Language function installed as an RFM.

Can anyone help? Is it possible?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Jul 20, 2004 at 05:57 PM

    Hi David,

    please have a look at the following thread: rfc-engine-service

    You must transfer the functionality of your Java server program in a stateless session bean.

    There are already some hints, documentation links and code samples which might be helpful for you.

    The Visual Administrator can be found at <drive>:\usr\sap\J2E\JC00\j2ee\admin\go.bat by default. If the SID is different in your system landscape, J2E must be replaced by your SID.

    Hope that helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi David,

      don't bother about the 6.xx version numbers, i guess they will be all synchronized to 6.40 in the productive release finally.

      Have fun

      Stefan

  • author's profile photo
    Former Member
    Jul 21, 2004 at 04:51 PM

    Stefan:

    Well, I guess I'm stuck at the first step.

    As I understand it, I have to use the Visual Administrtor to register the Web AS 6.40 Sneak Preview system as an RFC destination. When I bring up the Visual Administrator, it has essentially two tabs showing: Dispatcher and Server. It's inviting me to define a connection and Login. So, Q1: Is it inviting me to login to the J2EE or the Web AS? Either way, I am never able to login - I get this error:

    com.sap.engine.services.security.exceptions.BaseLoginException: Cannot create new RemoteLoginContext

    I used all of the NetWeaver sneak preview defaults when installing, and I recorded these:

    Type Account

    -


    OS User Compaq-laptop/J2EAdm

    OS User Compaq-laptop/SAPServiceJ2E

    DB User SAPJ2EDB

    J2EE Engine User Administrator

    J2EE Engine User Guest

    Q2: Is it possible to do what I'm trying to do with the Sneak Preview system?

    Or am I trying to connect and logon to the Web AS 6.20 Test Drive (I don't think so...)? I used the defaults when installing the Test Drive, and have these users:

    BCUSER

    DDIC

    Is it one of these I should be logging onto?

    Also, Visual Administrator wants a port specified on the J2EE Engine connection paramters - what port should I be specifiying?

    Can you get me past this dilemma, Stefan? Thanks...

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 21, 2004 at 06:10 PM

    In the hopes that this may be helpful to others on the forum, I offer this:

    My problem was apparently in specifying the incorrect port. I found a log file, generated when I installed the Sneak Preview, and in it I found that port 50004 had been specified for "p4 port". I changed my login paramters accordingly, and the login worked. I found that log file (batchconfig.log) in:

    \usr\sap\j2E\jc00\j2ee

    (There's lots of other stuff in there that may be useful later - I'll keep a copy of it someplace handy, I think.)

    Now, Stefan: I'm still trying to register this system as a remote destination using the Visual Administrator.

    I see the JCo RFC Provider Service under Services in the Cluster tab. My problem is now how to specify the correct information. For instance, is the program id the function name that will be called remotely from Web AS side? Or is it the name that will be used as the remote destination id? If it's the destination id, how does the correct session bean get hooked up with that servce/destination id?

    And I guess the gateway host and service are the ones I specified in SM59 on the Web As side?

    Thanks for your help - this is very confusing to someone starting from ground zero!

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 21, 2004 at 10:17 PM

    Ok - I think I've got this one handled, also. The program id is the destination name used in the R/3 system in SM59. Once I changed that, when I said to start the service (?) I got an indication that the detination had been started, and there was a little running man icon beside the destination/"program id" name.

    Let me ask you this: Having done all that definition, will the registration be done automatically when I bring up the J2EE engine, or will I still have to login manually using the Visual Administrator and start it myself?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi David,

      it will (or at least should 😊 be started on J2EE engine startup. You don't have to do this manually every time the engine restarts.

      Good luck

      Stefan