Creating Remote Interface using workshop

I created a session EJB using weblogic workshop 8.1 sp3. It autogenerated the remote interface that extends EJBObject, and is uneditable. I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager. How can I create my own remote interface while creating a session bean using workshop? Appreciate your help.

Hi,
I am in the same boat. Did you find any solution to it?.
Thank You.

Similar Messages

  • How to specify a base class for Remote Interface in Workshop 9.2? -- URGENT

    Hi,
    I am trying to create a UUP EJB in WebLogic 9.2 workshop. I am using @FileGeneration to create my home & remote interfaces. And the generated remote interface is extending javax.ejb.EJBObject;I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager which in turn implements javax.ejb.EJBObject. Can someone tell how i can do it in Workshop?.
    I came across Predefined Variable: remote.baseClass and as per docume
    ntation..."If specified, the value of this variable will be used as the base class for all generated remote classes. Where i should specify it?. @FileGeneration does nt have any option for it. Any help is grtly appreciated.
    Following are my code snippets:
    IMPL Class
    @FileGeneration(remoteClass = Constants.Bool.TRUE,remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE,remoteClassName = "MyEntityPropertyManager",remoteHomeName = "MyEntityPropertyManagerHome")
    public class MyEntityPropertyManagerImpl extends GenericSessionBean implements
              SessionBean {
    //code
    }

    This question was posted to both the bea.workshop.developer.general and weblogic.developer.interest.workshop (I had replied to the later on 10/19); after seeing an identical question today on this list want to include a reference to that reply here:
    http://forums.bea.com/bea/message.jspa?messageID=600044925&tstart=0
    -Rob

  • Obtain remote interface using PortableRemoteObject

    Hello,
    I have sample code from "Applying Enterprinse JavaBeans" book.
    Plan plan = (Plan)PortableRemoteObject.narrow(
    it.next(), Plan.class);
    ... plan.getPlanInfo() ...
    here:
    Plan is a remote interface of the entity bean (e.g.. MyPlanBean).
    getPlanInfo() is one of the business methods in Plan.
    In this case, the remote interface is obtained by using PortableRemoteObject.narrow(...). could anyone explane the creation using the concept of life cycle of an entity bean instance? That means if any ejbCreate() methods or any callback methods are involved in the creation or not?
    Thanks.

    I am not sure if you are doing the right thing.
    The home interface represents the life-cycle methods of the component (create, destroy, find) while the remote interface represents the business method of the bean.
    Clients use the bean's home interface to obtain references to the bean's remote interface. Following is the life-cycle of
    entity bean creation:
    1. Client invokes create() on home object
    2. Home object allocates a bean from the free pool
    3. Home object passes on the create args to the ejbCreate(..)
    in the bean
    4. the bean inserts a row into the database table
    5. the bean returns the primary key of the row to the home object
    6. The container creates an EJB object for the bean and populates
    it with the primary key
    7. The home object calls the ejbPostCreate() on the bean
    8. The home object returns the remote reference to the EJB
    object back to the client
    9. Client now makes business calls to the bean instance.
    No bean instance is associated with the EJB object
    10. EJB object communicates to the container that a bean
    instance is needed
    11. The container allocates a bean instance from the pool
    and associates it with the EJB object (ejbActivate() is called)
    12. home object invokes the ejbLoad method on the bean to
    tell it to load itself(BMP) or to tell it that it has just been
    loaded (CMP)
    13. the bean uses the primary key stored in the EJB object to load the approp row's data from the database
    14. EJB object dispatches the client's business method call to the
    bean
    Hope this helps.
    Regards,
    Sun-DTS

  • Reflection of remote interface

    Hi. was wondering if you could use reflection to ennumerate the remote interface used by a java RMI server. I dont have anything specific in mind just a point at some documentation about this kind of reflection would be cool.......or any obsticles that would prevent me from doing so.
    Thanks!

    why do we have remote/home interface.What for? You'd just restrict the use of inheritance, without providing any additional implementation details or better design "semantics".

  • Remote Interface

    Hey. I was wondering if there was a way to enumerate the remote interface used by an RMI server if you do not have the RMI Client. Ive been looking at reflection but from what ive seen it assumes you know what type of object you will be dealing with.

    You can use reflection on the server or the stub to enumerate the interfaces it implements. You have to filter them so you only look at interfaces which extend java.rmi.Remote.

  • ODI Groovy Script to create an interface

    Hi,
    I'm working on ODI 11.1.16 and trying to create an interface using Groovy Scripts. It throws me an error "java.lang.IllegalArgumentException: DataStore shouldn't be null "
    Below are my assumptions
    Source datastore : Groovy_Source
    Target datastore : Groovy_Trgt
    Context : Global
    Stndrd conn: localhost,1521,orcl
    def file = new File('c:/interfaces.txt')
    def s = 0
    Interfaces.txt contains : TEST1,SOURCE,DUMMY_GROOVY_SOURCE,STAGING,DUMMY_GROOVY_TRGT
    DataSet dataSet = odiInterface.getDataSets().get(0);
    OdiDataStore odiDatastore1 = ((IOdiDataStoreFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiDataStore.class)).findByName(DUMMY_GROOVY_SOURCE,Oracle);
    OdiDataStore targetDatastore = ((IOdiDataStoreFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiDataStore.class)).findByName(DUMMY_GROOVY_TRGT,Oracle);
    It throws an error here any help is appreciated
    Thanks
    VIB

    Hi Michael,
    Below is my entire code.. Picked it up from one of the blogs just trying to fine tune it. Thanks for your reply.
    //Created by ODI Studio
    // Context operators:
    import oracle.odi.domain.topology.OdiContext
    import oracle.odi.domain.topology.finder.IOdiContextFinder
    // Folder operators:
    import oracle.odi.domain.project.OdiFolder
    import oracle.odi.domain.project.finder.IOdiFolderFinder
    // Interface operators:
    import oracle.odi.domain.project.OdiInterface
    // Interface helpers:
    import oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions
    import oracle.odi.interfaces.interactive.support.targetkeychoosers.TargetKeyChooserPrimaryKey
    import oracle.odi.interfaces.interactive.support.mapping.automap.AutoMappingComputerLazy
    import oracle.odi.interfaces.interactive.support.mapping.matchpolicy.MappingMatchPolicyLazy
    import oracle.odi.interfaces.interactive.support.actions.InterfaceActionSetTargetDataStore
    import oracle.odi.interfaces.interactive.support.aliascomputers.AliasComputerDoubleChecker
    import oracle.odi.interfaces.interactive.support.clauseimporters.ClauseImporterLazy
    import oracle.odi.interfaces.interactive.support.actions.InterfaceActionAddSourceDataStore
    import oracle.odi.interfaces.interactive.support.actions.InterfaceActionOnTargetDataStoreComputeAutoMapping;
    // Transaction operators:
    import oracle.odi.core.persistence.transaction.support.DefaultTransactionDefinition;
    import oracle.odi.core.persistence.transaction.ITransactionDefinition;
    import oracle.odi.core.persistence.transaction.ITransactionManager;
    import oracle.odi.core.persistence.transaction.ITransactionStatus;
    // Data set:
    import oracle.odi.domain.project.interfaces.DataSet;
    // Data store:
    import oracle.odi.domain.model.OdiDataStore;
    import oracle.odi.domain.model.finder.IOdiDataStoreFinder;
    // Define VARS:
    def project = new String("Test") // What is the target project?
    def folder = new String("Test Subfolder") // Which folder in target project?
    def file = new File('c:/interfaces.txt')
    def s = 0
    // Get default context:
    OdiContext context = ((IOdiContextFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiContext.class)).findDefaultContext();
    // Get Folder:
    Collection odiFolders = ((IOdiFolderFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiFolder.class)).findByName(folder);
    if (odiFolders.size() == 0)
    println("Error: cannot find folder "+folder+" in project "+project)
    OdiFolder odiFolder = (OdiFolder) (odiFolders.toArray()[0]);
    // Print default settings:
    println ("Context used = " + context.getName())
    println ("Folder for interface = " + odiFolder.getName())
    file.eachLine { line ->
    s++
    toks = line.split(",")
    if (toks.length != 5)
    println("Error in input, line: "+s)
    else
    iname = toks[0]
    Oracle = toks[1]
    DUMMY_GROOVT_SOURCE = toks[2]
    Oracle = toks[3]
    DUMMY_GROOVY_TRGT = toks[4]
    // Transactie:
    ITransactionDefinition txnDef = new DefaultTransactionDefinition()
    ITransactionManager tm = odiInstance.getTransactionManager()
    ITransactionStatus txnStatus = tm.getTransaction(txnDef)
    OdiInterface odiInterface = new OdiInterface(odiFolder, iname, context);
    InteractiveInterfaceHelperWithActions interactiveHelper = new InteractiveInterfaceHelperWithActions(odiInterface, odiInstance, odiInstance.getTransactionalEntityManager());
    DataSet dataSet = odiInterface.getDataSets().get(0);
    OdiDataStore odiDatastore1 = ((IOdiDataStoreFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiDataStore.class)).findByName("DUMMY_GROOVY_SOURCE", Oracle);
    OdiDataStore targetDatastore = ((IOdiDataStoreFinder)odiInstance.getTransactionalEntityManager().getFinder(OdiDataStore.class)).findByName("DUMMY_GROOVY_TRGT", Oracle);
    interactiveHelper.performAction(new InterfaceActionAddSourceDataStore(odiDatastore1, dataSet, new AliasComputerDoubleChecker(), new ClauseImporterLazy(), new AutoMappingComputerLazy()));
    interactiveHelper.performAction(new InterfaceActionSetTargetDataStore(targetDatastore, new MappingMatchPolicyLazy(), new AutoMappingComputerLazy(), new AutoMappingComputerLazy(), new TargetKeyChooserPrimaryKey()));
    interactiveHelper.performAction(new InterfaceActionOnTargetDataStoreComputeAutoMapping())
    interactiveHelper.computeSourceSets()
    interactiveHelper.preparePersist()
    tm.commit(txnStatus)
    Edited by: VIB on Feb 18, 2013 10:46 AM

  • Using EJBObject as remote interface

    Hello all,
    I'm trying to make an ejb session available for web services. I see that we must create an interface similar to the EJBObject, but that simply extends Remote, to get the web service. So I tried to use the EJBObject (which extends Remote) directly in the wscompile to get the wsdl. Unfortunalety I get the following error message that I don't understand:
    error: type cannot implement remote: javax.ejb.EJBHome
    Can someone explain the problem ? And btw, I don't have any problem when I create a copy of my EJBHome and simply extends Remote instead of EJBHome. So why to I have to duplicate the same code in 2 separate classes ?
    Thanks for the help
    This works:
    public interface OperatorGroupCommands extends Remote {
    public void modify(OperatorGroup operatorGroup) throws RemoteException;
    This doesn't work:
    public interface OperatorGroupCommands extends javax.ejb.EJBObject {
    public void modify(OperatorGroup operatorGroup) throws RemoteException;

    I am having the same problem.
    I am try to use web service security in the sun j2ee 1.4 application server. I noticed that web services built from servlets work just fine, but web services built from ejbs do not work so well.
    I tried to deploy an ejb and the security stuff appears in the deploytool when I extend EJBObject. When I extend java.rmi.Remote, the stuff does not show up.
    Did you ever solve this problem?

  • Creating a directory on a remote machine using a UNC path

    Hi all,
    Is it possible to create a directory on a remote machine using a UNC path such as \\Server\Share\Directory?
    If so, how would i go about this? (Sorry for the newbie question, that's exactly what I am!)
    Thanks,
    Rob

    The tables on your pages are images. Not very convenient if the visitor wants to copy the information and use it.
    Read this how to use tables :
    http://www.wyodor.net/blog/archives/2010/01/entry_297.html
    http://www.wyodor.net/blog/archives/2010/01/entry_298.html
    Samples :
    http://www.wyodor.net/mfi/Maaskant/Seabreeze.html
    http://www.wyodor.net/mfi/Maaskant/Experiment.html
    http://www.wyodor.net/mfi/roodhout/Prices.html
    And here's a non-iWeb page with a sortable table :
    http://www.wyodor.net/htmlegg/TallCard/TallAjax.html?pg=tablesorter
    Or use a database on the server with MySQL and make tables with PHP :
    http://www.google.com/search?q=create+html+table+with+data+from+mysql+database
    Here's a very simple way to do it :
    http://home.wyodor.net/w3school

  • How to create the log file in remote system using log4j.

    Hi,
    How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
    public class Logging
    Logger log=null;
    FileAppender fileapp=null;
    public Logging(String classname)
    try
    log = Logger.getLogger(classname);
    String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
    fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
    log.addAppender(fileapp);
    log.info("Logger initilized");
    }catch(Exception ex)
    ex.printStackTrace();
    java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
    at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Please help.
    Thanks in advance.
    Saravanan.K

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Remote Interface problem using Sun ONE App & web server

    HI,
    1) I am using an S'less SB. I have local & remote interfaces. I am using the sun one appserver7 & the sun ones's htttp server. By default it doesnt pick up the remote interfaces is it ? How do i make my remote interfaces work ? what are the changes required in config/xml ?
    2) However i changed my client code (i.e my action class which is called by the struts action servlet ) to access the localhome rather than the remote home, but then i get java.lang.classcastexception.
    pls help !
    sanjay

    Hi parsuram,
    Thanks for the tip. After looking at the sample source code, I did finally figure out the solution - so I'll post it in case anyone else happens to be working with websphere studio has the same issue deploying on sun one.
    To access local interface ejb, you must have the following
    1. ejb-local-ref tag in the ejb-jar.xml like so underneath the <session> or <entity> tag of the bean which you plan to access the local ejb with.
    <ejb-local-ref>
    <ejb-ref-name>TestL</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>memory.simple.TestLLocalHome</local-home>
    <local>memory.tool.simple.TestLLocal</local>
    <ejb-link>TestL</ejb-link>
    </ejb-local-ref>
    2. similar ejb-ref tag in sun-ejb-jar.xml
    <ejb-ref>
    <ejb-ref-name>TestL</ejb-ref-name>
    <jndi-name>localejbs/module_memory.betaEJB/TestL68640023372300293</jndi-name>
    </ejb-ref>
    note: sun generates the <jndi-name> and overwrites whatever you put in that tag no matter what you put in there.
    3. here is the code to access
    Context initial = new InitialContext();
    TestLLocalHome tlHome=(TestLLocalHome) Initial.lookup
    ("TestL");
    //the string must match <ejb-ref-name> underneath <ejb-local-ref>
    4. note that the jndi name for the local interface bean becomes irrelevant. only the <ejb-ref-name> in the ejb-jar and sun-ejb-jar matter. furthermore, both <ejb-ref-name> must be the same or you won't be able to deploy.
    5. This is completely my fault for not checking the "proper" way to access local interfaces. in websphere, they let you get away without the ejb-ref tags and just use the string "local:/TestL"!
    -matt

  • Regarding creating an interface in se24 and using in se38

    Hi,
       Plz could any body help me in creating an interface and using it in se38 with clear steps and saple code of se 38 how we write it.
    it is urgent plz help......
    Thanks,
    sana.

    You do know that in the context of SE24, interface is an object oriented term?
    DATA: my_obj TYPE REF TO zif_my_interface.
    CREATE DATA my_obj TYPE zcl_my_class.
    zcl_my_class implements zif_my_interface.
    matt

  • To create interface using Integration Repostiory and Integration Directory

    How To create interface using Integration Repostiory and Integration Directory for Java appln???

    Hi,
    Are u talking about Java based applications. If so, one of the way is to go with Java Proxies.
    Go thru these for more:https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06315a6-e66e-2910-039c-ba8bbbd23702
    Rgds,Moorthy

  • Adobe Reader XI (11.0.08) doesn't create thumbnail (bitmap) using Microsoft Interface IExtractImage -- Extract on Windows Server 2008 R2, when exe to generate thumbnail is launched from Windows service.

    Adobe Reader XI (11.0.08) doesn't create thumbnail (bitmap) using Microsoft Interface IExtractImage --> Extract on Windows Server 2008 R2, when exe to generate thumbnail is launched from Windows service.
    But if exe is launched as standalone, then interface IExtractImage --> Extract, gives Bitmap to generate thumbnail of PDF document.
    Above problem occurs only for PDF documents, if we tried same with other software like CAD -CATIA it works without any problem.
    Is there any security concerns form PDF side, which doesn't allow to generate Bitmaps, if exe to generate it is launched form Windows service.

    It might be deliberate, Acrobat and Reader software is not intended to run in a service environment.

  • Configure webapp to use local or remote interface based on environment

    Hi,
    I have the following problem I am trying to solve (app server is Weblogic 10g by the way).
    I have a webapp (war-project) and an ear project containing stateless session beans.
    In our development environment I would like to deploy the war and ear separately, because that is easier for development (war-project can then be deployed as a directory, so changes to jsp's and such have immediate effect).
    Deploying the war and ear separately means that the war-project can only call the session beans through their remote interfaces. For development this is not a problem.
    In a production environment however we would like to package the war INSIDE the ear, so that the webapp can use the local interfaces to call the session beans, as this will improve performance.
    So I am looking for a solution where I can configure the way beans are called. Local if the war is inside the ear, remote if the war is separate from the ear. I was thinking along the lines of packaging a properties file with the war that determines the mode (local or remote). Or maybe packaging a different deployment descriptor, if that is a possibility.
    This is what I have so far:
    Business Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestService {
         public void doSomething();
    Remote Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestServiceRemote extends TestService {
    Local Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestServiceLocal extends TestService {
    Bean implementation_
    package be.cegeka.test.ejb3.service;
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless(mappedName="ejb/TestService")
    @Local(TestServiceLocal.class)
    @Remote(TestServiceRemote.class)
    public class TestServiceBean implements TestService {
         @Override
         public void doSomething() {
              System.out.println("I'm doing something");
         @Override
         public void doSomethingLocal() {
              System.out.println("I'm doing something local");
    JSF backing bean_
    package be.cegeka.test.ui;
    public class MyWebAppBackingBean {
         @EJB(mappedName="ejb/TestService", beanInterface=TestServiceRemote.class)
         private TestService testService;
         public String doSmth() {
              testService.doSomething();
              return "success";
    }The part that I would like to be configurable is the "+beanInterface=TestServiceRemote.class+" part in the JSF backing bean. Depending on the environment (development vs. production), this should be "+beanInterface=TestServiceRemote.class+" for development and "+beanInterface=TestServiceLocal.class+" for production.
    Is something like this possible?
    I would like to avoid having to fill my web.xml with ejb-refs and having to do the JNDI-lookups myself if at all possible, to keep things as easy and clean as possible.
    Any ideas are welcome!
    Steven

    Hey Manish,
    comments inline.
    "manish kumar" <[email protected]> wrote in message
    news:1794338.1102557677925.JavaMail.root@jserv5...
    So If they are supposed to be in the same JVM -
    then
    1. the cluster of 3 weblogic servers are three JVMs. So does that meanLOCAL INTERFACES CAN'T BE USED IN CLUSTERED ENVIORONMENT ?
    Sure they can, but the calling component in an enterprise app will not call
    an intance of the local bean on another node in the cluster. It will make a
    by-reference call to the local component in the same EAR. Local interfaces
    are not Remote, so they cannot be used with by-value RMI semantics.
    >
    2. ARE YOU SURE ABOUT THIS FACT THAT THAT LOCAL INTERFACES CAN BE USEDONLY INSIDE THE SAME APPLICATION, I THOUGHT IT CAN BE USED AS LONG AS CLINET
    IS IN THE SAME JVM?
    PLEASE CONFIRM.........!!!!!!!!!!!!!Dead sure:
    http://e-docs.bea.com/wls/docs81/programming/classloading.html#1073506
    http://e-docs.bea.com/wls/docs81/ejb/understanding.html#1126831
    http://e-docs.bea.com/wls/docs61/ejb/cmp.html#1085452
    http://www.theserverside.com/discussions/thread.tss?thread_id=14628
    Also, search the ejb newsgroups. I know Rob Woollen has addressed this in
    here somewhere. And, if Rob says it's so, trust me, it's so.
    Bill

  • Prob creating ABAP Proxy-Interface use external and interna msg definition

    Hi,
    I've created a service interface using external definition (message type for request and response), imported via WSDL file. However, while creating ABAP proxy in SPROXY, it gave the error message "Interface uses external and internal message definition". I searched through the forum, the questions were raised but no definite answer was found. Is it not possible to generate a proxy if there is any external definition used?
    Details of the error message:
    Message no. SPRX122
    Diagnosis
    In a message interface you can use messages from different sources:
    Message types and fault message types edited in the Enterprise Services Repository
    Messages imported into the Enterprise Services Repository (external definitions, RFC, IDoc)
    In the current message interface, message types from different sources have been used. Since messages from these different sources must be handled differently during proxy generation, such a mixture of messages within a message interface is not possible.
    System Response
    The interface cannot be generated.
    Procedure
    Change the interface definition accordingly in the Enterprise Services Repository.
    p/s: My external definition is actually derived from a ABAP FM web service. The reason why i used external definition is that i try to avoid the tedious steps of hard-coding all the data types for the request and response message types.
    Any help would be highly appreciated.
    - julius

    Hi Arvind,
    For technical reasons, proxy generation and the respective editors in the Integration Builder do not support the entire language range of XML schema and WSDL. For an overview of which language elements are supported, see the Excel spreadsheet in the SAP Service Marketplace at service.sap.com/xi ® Media Library ® Documentation: SAP XI 3.0 (SP11) u2013 Supported XML Schema and WSDL (EN).
    I couldnt find the above document in the service market place. Any hint to find it?
    Thanks.
    - julius

Maybe you are looking for