Replicating simple Java objects for automatic failover

Is there a way to replicate a simple java object that is bound from JNDI
          across all servers so that if the primary server fails, it will
          automatically failover?
          We have a java client that uses JNDI to access EJBs on WLS5.1 SP8. In order
          to determine client information, the client currently binds a simple java
          class in the JNDI tree. The Entity and Session beans use the caller
          principal to locate the object in order to access client-information for
          such things as record locking, logging, etc..
          We have to move this architecture to a cluster environment and we are
          wondering how we can replicate this object across cluster servers so that
          failover is handled automatically, and that it is still accessible through
          JNDI.
          An RMI replicated stub is not enough, since it only works as long as the
          server hosting the RMI object is alive.
          I'd like to add that the object is created and bound at client start-up and
          destroyed at client exit.
          Thank you for any advice or information,
          Dania Kodeih.
          

A: Replicating simple Java objects for automatic failover

That's what I figured. I guess the only solution in this case is to persist
          the object during client sessions. I was hoping for something simpler, but I
          guess I'll have to create an Entity Bean and everything else that comes with
          it.
          Thanks,
          Dania.
          Cameron Purdy wrote in message <[email protected]>...
          >Unfortunately, when the originating server goes down, the replicated object
          >disappears.
          >
          >Peace,
          >
          >--
          >Cameron Purdy
          >Tangosol, Inc.
          >http://www.tangosol.com
          >+1.617.623.5782
          >WebLogic Consulting Available
          >
          >
          >"Don Ferguson" <[email protected]> wrote in message
          >news:[email protected]..
          >> If I am not mistaken, any serializable object will automatically be
          >replicated
          >> across the tree.
          >>
          >> Dania Kodeih wrote:
          >>
          >> > Is there a way to replicate a simple java object that is bound from
          JNDI
          >> > across all servers so that if the primary server fails, it will
          >> > automatically failover?
          >> >
          >> > We have a java client that uses JNDI to access EJBs on WLS5.1 SP8. In
          >order
          >> > to determine client information, the client currently binds a simple
          >java
          >> > class in the JNDI tree. The Entity and Session beans use the caller
          >> > principal to locate the object in order to access client-information
    �... [Show more]

Read other 4 answers

Similar Messages

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • Java Objects for Oracle datatypeJava Objects for Oracle user-defined datatype

    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    Does anyone have an example? Your expertise would be much appreciated.
    Thanks,
    Roxanne
    null

    Hi Roxanne,
    I have the same problem if you get an idea or answer..I have a problem in updating and inserting in Varray datatype from java object of Objects (arraylist)..
    please mail me
    [email protected]
    Bye
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    Does anyone have an example? Your expertise would be much appreciated.
    Thanks,
    Roxanne
    null

  • Advantages of using ejb vs java objects for pipeline components?

    hi,
    one of our applications is a fairly simple application. for simplicity sake, we are considering using java objects (accessing database tables) instead of ejbs for our pipeline components.
    before flying with this decision, we'd like to be sure we are not missing something obvious.
    please send me any references/pointers you have that summarize what the advantages of one approach (ejb vs java objects) over the other are.
    thanks!

    Wole, you will get a much better response posting this to
    weblogic.developer.interest.ejb newsgroup.
    Joseph Nguyen
    BEA Support
    "Wole Bankole" <[email protected]> wrote in message
    news:3c9a6a1a$[email protected]..
    hi,
    one of our applications is a fairly simple application. for simplicitysake, we are considering using java objects (accessing database tables)
    instead of ejbs for our pipeline components.
    >
    before flying with this decision, we'd like to be sure we are not missingsomething obvious.
    >
    please send me any references/pointers you have that summarize what theadvantages of one approach (ejb vs java objects) over the other are.
    >
    thanks!

  • Simple java class for SQL like table?

    Dear Experts,
    I'm hoping that the java people here at the Oracle forums will be able to help me.
    I've worked with Oracle and SQL since the 90s.
    Lately, I'm learning java and doing a little project in my spare time. 
    It's stand alone on the desktop.
    The program does not connect to any database 
    (and a database is not an option).
    Currently, I'm working on a module for AI and decision making.
    I like the idea of a table in memory.
    Table/data structure with Row and columns.
    And the functionality of:
    Select, insert, update, delete.
    I've been looking at the AbstractTableModel.
    Some of the best examples I've found online (they actually compile and work) are:
    http://www.java2s.com/Code/Java/Swing-JFC/extendsAbstractTableModeltocreatecustommodel.htm
    http://tutiez.com/simple-jtable-example-using-abstracttablemodel.html
    Although they are rather confusing.
    In all the examples I find, there always seems to be
    at least three layers of objects:
    Data object (full of get/set methods)
    AbstractTableModel
    GUI (JFrame, JTable) (GUI aspect I don't need or want)
    In all the cases I've seen online, I have yet to see an example
    that has the equivalent of Delete or Insert.
    Just like in SQL, I want to define a table with columns.
    Insert some rows. Update. Select. Delete.
    Question:
    Is there a better java class to work with?
    Better, in terms of simpler.
    And, being able to do all the basic SQL like functions.
    Thanks a lot!

    Hi Timo,
    Thanks. yes I had gone thru the java doc already and  they have mentioned to use java.sql.Struct, but the code which got generated calls constructor of oracle.jpub.runtime.MutableStruct where it expects oracle.sql.STRUCT and not the java.sql.STRUCT and no other constructor available to call the new implementation and that is the reason i sought for some clues.
      protected ORAData create(CmnAxnRecT o, Datum d, int sqlType) throws SQLException
        if (d == null) return null;
        if (o == null) o = new CmnAxnRecT();
        o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);
        return o;
    here CmnAxnRecT is the class name of the generated java class for sqlType.
    Thanks again. Please let me know if you have any more clues.
    Regards,
    Vinothgan AS

  • Simple Java Example for DI API

    Hello,
    I have a Java Application and would like to connect to a SAP BO Database using JCO and DI API.
    I want a simple java example that just connects to the BO Database and returns an item name or value or a recordset from the database.
    Since i dont have the names of what kind of fields, items , tables exist in the SAP BO Demo database i need a basic example to make sure that i can connect to the database and retrieve data from the DB.
    Any help in this regard would be appreciated...
    Amit

    Dear Amit Hingher,
    The B1 JCO is a java wrapper for DI API so basically you could refer to DI help for all objects, methods and properties.
    Here the jave sample for connection function:
    package test;
    import com.sap.smb.sbo.api.*;
    public class ConnectSAP {
         // company interface
         public ICompany company;
         private SBOErrorMessage errMsg = null;
         public static void main(String[] args) {
              ConnectSAP company = new ConnectSAP();
              company.conn();
         //method make connection andinitialize company instance
         public int conn() {
              int rc = 0;
              try {
                   company = SBOCOMUtil.newCompany();
                   company.setServer("(local)");
                   company.setCompanyDB("test");
                   company.setUserName("manager");
                   company.setPassword("manager");
                   company.setDbServerType(...);
                   company.setUseTrusted(new Boolean(false));
                   company.setLanguage(SBOCOMConstants.BoSuppLangs_ln_English);
                   company.setDbUserName("Sa");
                   company.setDbPassword("123");
                   company.setAddonIdentifier("...");     
                   company.setLicenseServer("...");
                   rc = company.connect();
                   if (rc == 0) {
                        System.out.println("Connected!");
                   } else {
                        errMsg = company.getLastError();
                        System.out.println(
                             "I cannot connect to database server: "
                                  + errMsg.getErrorMessage()
                                  + " "
                                  + errMsg.getErrorCode());
              } catch (Exception e) {
                   e.printStackTrace();
                   return -1;
              return rc;
         public void freeConnection(){
              company.disconnect();
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • Explicity mapping between ActionScript and Java objects for the BlazeDS Messaging Service

    The BlazeDS documentation shows how to explicitly map between ActionScript and Java objects. For example, this works fine for RPC services, e.g.
    import flash.utils.IExternalizable;
    import flash.utils.IDataInput;
    import flash.utils.IDataOutput;
    [Bindable]
    [RemoteClass(alias="javaclass.User")]
    public class User implements IExternalizable {
            public var id : String;
            public var secret : String;
            public function User() {
            public function readExternal(input : IDataInput) : void {
                    id = input.readObject() as String;
            public function writeExternal(output : IDataOutput) : void {
                    output.writeObject(id);
    and
    import java.io.Externalizable;
    import java.io.IOException;
    import java.io.ObjectInput;
    import java.io.ObjectOutput;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    public class User implements Externalizable {
        protected String id;
        protected String secret;
        public String getId() {
            return id;
        public void setId(String id) {
            this.id = id;
        public String getSecret() {
            return secret;
        public void setSecret(String secret) {
            this.secret = secret;
        public void readExternal(ObjectInput in) throws IOException,
                    ClassNotFoundException {
            id = (String) in.readObject();
        public void writeExternal(ObjectOutput out) throws IOException {
            out.writeObject(id);
    If I called an RPC service that returns a User, the secret is not sent over the wire.  Is it also possible to do this for the messaging service? That is, if I create a custom messaging adapter and use the function below, can I also prevent secret from being sent?
    MessageBroker messageBroker = MessageBroker.getMessageBroker(null);
    AsyncMessage message = new AsyncMessage();
    message.setDestination("MyMessagingService");
    message.setClientId(UUIDUtils.createUUID());
    message.setMessageId(UUIDUtils.createUUID());
    User user = new User();
    user.setId("id");
    user.setSecret("secret");
    message.setBody(user);
    messageBroker.routeMessageToService(message, null);

    Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
    That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
    -Alex

  • Business object for Automatic Run in FICO

    Hi experts,
       In Automatic run the work flow has to trigger when the status as ' Proposal is ready to be started / created ' in Transaction F110 and then post the payment in workflow. Please let me know if any business object is avalable for that. If we can trigger the workflow through the Business Transaction Event means, let me know the procedure and the parameters for the Business Transaction events.
    I ll reward the points if it is helpful.......
    Thanks and Regards,
    Velu.....

    Try BTE, process 00001860. Sample FM SAMPLE_PROCESS_00001860. There is no specific business object for this as far I know, therefore you can build your own or start a WF directly.
    Regards, IA

  • Simple java compiler for win

    I used the javac command in dos mode to compile my .java files , but in my recent program i have so many errors that they dont fit into the dos screen(in dos mode i cannot move up and down!).
    Is there any simple compiler for windows(or GUI) that could solve my problem?

    If you haven't done this already you can right click on your Dos Prompt icon and go to properties, then go to Screen, then change the initial size of your prompt to the largest it will go, (50 lines I think). That might give you a little more room...

  • Creating a SIMPLE Java APPLET for a HTML website

    Hello!
    I was wondering if anyone can help me.
    i have designed a very simple HTML website and wanted to make an applet.
    which program would be best (eclipse, blue j...etc)
    and how do i go about it!
    i am very new to this and would appriciate the help
    many thanks in advance

    sabre150 wrote:
    gimbal2 wrote:
    your brain to do all the hard work. It needs to be preloaded with knowledge of programming, the Java language, the Java platform and the Java plugin relating to applets before it will work.So that's where I have been going wrong!Lies, I know for a fact that you know a thing or two. What are you trying to do here? Hide from your responsibilities as a knowledgeable person?

  • Excluding certain objects for automatic code inspection

    Greetings,
    We have turned on the automatic use of Code Inspector when releasing a transport.  In general, this works how we want.  None the less, there are certain programs that we want to exclude from being checked by Code Inspector.  Specifically, code provided by external vendors are failing the DEFAULT code inspector variant.  While I'd like to force the vendor to adhere to our controls, this is not practicial.  My question is can we exclude code inspection of certain objects ??
    Thanks,
    Rich

    Hi Cinci,
    If you have MAX 4.2.1, it sounds like you have installed the newest version of DAQmx.  It's true that this version does not support LabVIEW 7.0.  I'm not sure why you would have installed DAQmxBase.  You will need to use DAQmx 8.0.1 or older with LabVIEW 7.  It is available for download here. You will need to uninstall the version of DAQmx that is currently installed on your computer before installing this older version. 
    Let us know how that goes.
    Thanks,
    Luke
    Applications Engineer
    National Instruments

  • How to reload class file for java objects in CF MX7

    I'm trying to create a simple java object for use in a CFML
    page. According to the topic "About ColdFusion and Java objects" in
    the CF developer's guide, I can compile my java module and put the
    .class file in the CFusionMX7/wwwroot/WEB-INF/classes directory and
    it'll be dynamically reloaded any time CF sees a new .class file
    there. But the dynamic reload isn't happening; I have to restart
    the CF server to get it to pick up a new version.
    I don't believe this directory is in the "general JVM
    classpath"; I don't find "classes" in the Java Class Path in the CF
    Administrator's System Information page. And I have all the caching
    options turned off on the "Server Settings > Caching" page, if
    that has any bearing on it.
    Are there any known issues around this dynamic reload
    capability, or maybe a more definitive way to make sure the
    WEB-INF/classes directory isn't in the classpath?
    Thanks,
    James

    Yes, I understand. But if I'm reading it correctly, what
    you're saying seems to contradict the documentation
    http://livedocs.adobe.com/coldfusion/7/htmldocs/00001561.htm
    ColdFusion dynamically loads classes that are either .class
    files in the web_root/WEB-INF/classes directory or in JAR files in
    the web_root/WEB-INF/lib directory. ColdFusion checks the time
    stamp on the file when it creates an object that is defined in
    either directory, even when the class is already in memory. If the
    file that contains the class is newer than the class in memory,
    ColdFusion loads the class from that directory.
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18228&sliceId=1
    Dynamic class reloading for Java servlets classes and
    forcfobject (sic) Java classes is disabled by default in
    ColdFusion MX. To enable dynamic class reloading, do the following:
    Also, I seem to recall that setting worked in a prior
    version. Though I would have to test it again on another machine to
    be certain.

  • Java Object Cache

    With a cache loader, the Java Object Cache automatically determines if an object needs to be loaded into the cache when the object is request.
    Can someone tellme how exactly this works.
    I am trying to get the cache framework to load objects automatically in the cache.
    hwoever unless i explicitly use the CacheAcess.put method. the object is not loaded in the cache.
    Plss lemme knw, how the framework does it automatically.
    Regards,
    Mukta

    Hi Mukta,
    FYI, This discussion forum is all about Web Cache, and not related to Java Object Cache.
    Anyways, to hint you on automatic loading of objects -> use the CacheAccess.preLoad() method.
    You can post this question in a forum related to the Java Object Cache, for better answers.
    Regards,
    Priyanka GES
    Oracle Web Cache Team

  • JOB (Java OBject) plug-in

    Hello --
    I recently downloaded the JOB (Java Object) plug-in, that, according to the plug-in documentation is will:
    JOB is an Extension that creates Java Objects for underlying Oracle Database Objects. This Extension uses the package, source directory and other Oracle9i JDeveloper Project information and creates the source code in the appropriate source directory with the appropriate package name from the project.
    Has anyone gotten this to work? I have the plug-in installed, and it appears to function, but I can't find the java files it generates anywhere.
    Thanks,
    Donn Aiken

    I have same problem.
    Per doc:
    1, Copy job.jar to the $JDEV_HOME/lib/ext directory
    2, Enter the package name for the Value Object in the JDeveloper Projects Package Area
    3, Enter the Source Directory in the JDeveloper Projects Source Code Area
    But where is the JDeveloper Projects Package Area? Where is the JDeveloper Projects Source Code Area?
    Much thanks for nay help!
    Charles

  • Java Bean for Marquee or scrolling text

    Can anybody help to make the simple java bean for scrolling a text in ORacle forms 10g?
    Regards
    Omama Khurshid

    Please help me and send it to my mail.
    [email protected]

Maybe you are looking for