Clustering objects in jndi

Hi all,
I am building a solution using weblogic version 6.1sp1.
I am needing to share an object around a set of clusters to tell each cluster
about the services in the other clusters.
The first solution I thought of was to create a javax.naming.Reference to bind
into each of the clusters' JNDI tree and have it replicated throughout the tree.
After reading about the behavior of these types of objects, I am not sure how
to proceed.
It appears from the docs that if the server that bound the object into jndi goes
down the object will be unbound from all of the other servers in the cluster.
Please inform if my interpretation of the docs was incorrect.
The solution I am working for now is to not replicate the objects, and to create
a startup class for all of the servers, when they come up they will create and
bind their own versions.
Also, if anyone has another solution to this problem please reply ...

Your solution sounds right. Don't forget to set REPLICATE_BINDINGS to 'false' :
http://e-docs.bea.com/wls/docs61/javadocs/weblogic/jndi/WLContext.html
Chris Humphrey <[email protected]> wrote:
Hi all,
I am building a solution using weblogic version 6.1sp1.
I am needing to share an object around a set of clusters to tell each cluster
about the services in the other clusters.
The first solution I thought of was to create a javax.naming.Reference to bind
into each of the clusters' JNDI tree and have it replicated throughout the tree.
After reading about the behavior of these types of objects, I am not sure how
to proceed.
It appears from the docs that if the server that bound the object into jndi goes
down the object will be unbound from all of the other servers in the cluster.
Please inform if my interpretation of the docs was incorrect.
The solution I am working for now is to not replicate the objects, and to create
a startup class for all of the servers, when they come up they will create and
bind their own versions.
Also, if anyone has another solution to this problem please reply ...--
Dimitri

Similar Messages

  • Accessing objects thro jndi

    Hi,When we create initial context thro in ejb, we can create it by two ways.1st// Obtain the enterprise bean’s environment naming context.Context initCtx = new InitialContext();Context myEnv = (Context)initCtx.lookup("java:comp/env");2nd Context ctx = null;Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL, "t3://hostname:port"); try {    ctx = new InitialContext(ht);      } ... ...What is the difference between these two ways?When we have to use java:comp/env ?Thanks in Advance.

    Thanks a lot Jesse.
    Jesse E Tilly <[email protected]> wrote in message
    news:[email protected]..
    [This followup was posted to weblogic.developer.interest.jndi and a copy
    was sent to the cited author.]
    In article <3a82bb7d$[email protected]>, [email protected] says...
    Thanks.
    Do I need to give connection parameters in clustered environment? or can
    we
    consider this as same JVM?
    Mahendra
    In a clustered environment, the JNDI tree is being replicated, and by
    default, anything added to the context using the default context will be
    replicated.
    I will say that I have read some posts concerning a "per server" JNDI
    tree. I have not tested this nor do I understand the line that WebLogic
    draws in terms of what gets replicated and what doesn't. Please read
    http://www.weblogic.com/docs51/classdocs/API_jndi.html#user for more
    details on binding objects in a cluster.
    JT
    Senior Developer, HotelTools INC
    [email protected]

  • Weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non clusterable object with jndiName ]

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

  • Administering AQ JMS objects in JNDI

    I had used several JMS providers before like MQ and Tibco but I'm new to Oracle AQ.
    I'm trying to write a JMS client program which lookups a connection factory and a destination from a JNDI context, and then create a session and publish JMS messages.
    However, I cannot find a way to register JMS objects in JNDI. The sample programs provided by Oracle use a JMS session to create destination objects, which means they're not portable to other messaging system.
    Questions:
    1. Is there a way to administrate JMS objects in JNDI context in version 8.1.7?
    2. I did search the forum and it seems like looking up JMS objects from JNDI is available on Oracle 9i. Is that true? And what administration tool am I supposed to use?
    Thanks,
    Andy

    Hi,
    I am not sure with OSB. I never seen the face of it. But when you say you are not able to see the subscriber in the table then you cannot consume the message.
    Can quickly create AQJMS adapter service in bpel and select your topic and deploy the service in SOA server. Once it deploy go to the aq$my_topic1_s check if you able to see or not. And also try de-queue a message from the same topic.
    I am using JMS Transport for Proxy Service and i have enabled the durable subscriber option as well. Please tell me how the entries in the subscribers table gets added.
    You no need to do any thing. Just deploy your service and after that you should able to see record in the table. If record is not created then connection is not established between Topic and your service.
    I have doubt with the endpoints only
    jms://localhost:8011/aqjms.XATopicConnectionFactory/AqTopic
    Your JNDI name for connection factories given as aqjms/XATopicConnectionFactory and here its aqjms.XATopicConnectionFactory. Can you check it.
    Apart of this everthing looks same. Try above and let us know it.
    Regards,
    Tarak.
    Edited by: Tarak on Nov 1, 2012 3:36 PM

  • Help|| Is there any tool available to register Oracle datasource objects into JNDI

    Is there any tool available to register Oracle datasource objects into JNDI.If so please tell me where can I download.
    Thanks
    shiva

    I'd like to know the answer to this also.
    I just started reading about JNDI 2 days ago and have never used it. I'd like to use DataSource in my application with JNDI. If I can use the database as my JNDI "server", then I'd prefer to do that instead of having a seperate external server.

  • Unable to bind object in JNDI tree.

    While I try to bind a simple object in JNDI tree I get the following error.
    I have not used any cluster .
    Server : Web Logic 8.1 SP 6
    Jdk version 1.4.2 comes along with bea weblogic 8.1 sp 6
    Javax.naming.communicationException[
    Root exception is java.rmi.unmarshalException:
    Error unmarshalling arguments; nested exception is :
    Java.lang.ClassNotFoundException: com.examples.person : This error could indicate that a compound was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on a server that is part of a cluster is also deployed on all other member of that cluster.

    Is this somehow being called from the parameterless constructor?
    You sometimes have to wrap bits of code with in designer checks to stop em running.
    In c# that would be:
    if (!DesignerProperties.GetIsInDesignMode(this))
    // do your stuff only at runtime
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • Unable to register object in JNDI tree

    While I try to bind a simple object in JNDI tree I get the following error.
    I have not used any cluster .
    Server : Web Logic 8.1 SP 6
    Javax.naming.communicationException[
    Root exception is java.rmi.unmarshalException:
    Error unmarshalling arguments; nested exception is :
    Java.lang.ClassNotFoundException: com.examples.person : This error could indicate that a compound was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on a server that is part of a cluster is also deployed on all other member of that cluster.
    -------------------------------

    Is this somehow being called from the parameterless constructor?
    You sometimes have to wrap bits of code with in designer checks to stop em running.
    In c# that would be:
    if (!DesignerProperties.GetIsInDesignMode(this))
    // do your stuff only at runtime
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • How to bind an object to JNDI tree in iAS?

    Hi all,
    When I try to bind a string object to jndi tree, the following exception
    occurs:
    javax.naming.NamingException: Unable to get object instance from reference.
    Roo
    t exception is javax.naming.NamingException: Can't bind instance of class
    java.lang.String
    at com.netscape.server.jndi.RootContext.bindCtx(Unknown Source)
    at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
    at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
    at javax.naming.InitialContext.rebind(InitialContext.java:385)
    at jsp.APPS.bmx.test2._jspService(test2.java:76)
    at jsp.APPS.bmx.test2.service(test2.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    The code fragment is:
    Context ctx = new InitialContext();
    String str = "hell,every one!";
    ctx.rebind("abc", str);
    Can anyone give some help? Thanks in advance.
    Johnson

    To bind an object into the JNDI tree check the documentation here:
    http://e-docs.bea.com/wls/docs81/jndi/jndi.html#475702
    If this is to be used by all your applications that you deploy on the server check out the startup/shutdown class documentation here:
    http://edocs.bea.com/wls/docs81/ConsoleHelp/startup_shutdown.html
    Cheers
    IV

  • Custom Objects in JNDI Not Being Replicated in Cluster

    I know this is going to end up being something really simple, but I can't find
    any docs or other posts on it.
    I have a simple two node weblogic 7.0 cluster. In a startup class that is deployed
    to the cluster I check for and create a subcontext. This subcontext will just
    hold custom objects when a node comes up. When a node does come up, one of the
    web applications binds a non-RMI custom object to the subcontext created via the
    startup class.
    Once both nodes in the cluster are up I can see via the weblogic console's "View
    JNDI tree" feature that the custom object bound on node 1 is only visible in the
    JNDI tree of node 1. Similarly the object bound on node 2 is only visible in
    the JNDI tree of node 2.
    Is the JNDI tree that is visible via the console the JNDI specific to the node
    and not the clusterwide JNDI tree? Do I have to do something special to get access
    to the cluster wide JNDI tree (for instance when creating an InitialContext)?
    Is there a way to view the cluster wide JNDI tree?
    Thanks for any information.

    Hi Matt,
    how did you compile t3 stubs,there are -clusterable or something like this
    option shat should make replicatable-aware stubs.
    "Matt" <[email protected]> wrote:
    >
    I know this is going to end up being something really simple, but I can't
    find
    any docs or other posts on it.
    I have a simple two node weblogic 7.0 cluster. In a startup class that
    is deployed
    to the cluster I check for and create a subcontext. This subcontext
    will just
    hold custom objects when a node comes up. When a node does come up,
    one of the
    web applications binds a non-RMI custom object to the subcontext created
    via the
    startup class.
    Once both nodes in the cluster are up I can see via the weblogic console's
    "View
    JNDI tree" feature that the custom object bound on node 1 is only visible
    in the
    JNDI tree of node 1. Similarly the object bound on node 2 is only visible
    in
    the JNDI tree of node 2.
    Is the JNDI tree that is visible via the console the JNDI specific to
    the node
    and not the clusterwide JNDI tree? Do I have to do something special
    to get access
    to the cluster wide JNDI tree (for instance when creating an InitialContext)?
    Is there a way to view the cluster wide JNDI tree?
    Thanks for any information.

  • How to add an object in JNDI when a server starts?

    I have an integration app. The app contains EJB project. The project contains EJB which reads data from LDAP.
    My first version of EJB contains the following code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, strProvider);
    env.put(Context.SECURITY_AUTHENTICATION, strAuth); env.put(Context.SECURITY_PRINCIPAL,strPrincipal); env.put(Context.SECURITY_CREDENTIALS,strCredentials);
    DirContext dirCtx = new InitialDirContext(env); // exception
    All connection properties are hardcoded and it is not a good practice.
    Also I can put those properties into deployment descriptor. But I am going to have some EJBs and each EJB has to have those properties into descriptors. It is not useful.
    My idea: I would like to have whatever object which is called automatically when a server starts; this object creates InitialDirContext and put the context into JNDI. All EJBs lookup the context by a name. But I don't know how to do that.
    And another question: how to change connection properties dynamically? My idea is putting the properties in XML Cache. And my object (which creates InitialDirContext) reads the properties from XML Cache. Can I handle a message that my properties in XML Cache have been changed and in this cases my object reads new properties and calls rebind() to update InitialDirContext?
    Thanks,
    Ivan

    To bind an object into the JNDI tree check the documentation here:
    http://e-docs.bea.com/wls/docs81/jndi/jndi.html#475702
    If this is to be used by all your applications that you deploy on the server check out the startup/shutdown class documentation here:
    http://edocs.bea.com/wls/docs81/ConsoleHelp/startup_shutdown.html
    Cheers
    IV

  • Bind a huge object to jndi tree in sun one 7

    Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. Kindly provide some guidance. Thanks in advance.

    Hi,
    Refer http://java.sun.com/products/jndi/tutorial/objects/storing/remote.html
    -amol

  • How many clusterable things in JNDI tree?

    We're starting to try out clustering in WL 5.1 (sp8 on WinNT for now) We're
              seeing some odd behavior and we're wondering if the cause is related to JNDI
              replication messages. If we deploy just a couple of clusterable rmi
              services on two servers in a cluster, things seem to work ok. They maintain
              a connection to each other and can be viewed with the Admin console.
              However, if we deploy about 200 clusterable things (mostly EBs that by
              default have clusterable homes) then things get weird. If we just bring up
              one server, things aren't too bad. But when we bring up the second server,
              communication between the two servers is only established briefly before we
              get a "Timed out server" or something worse.
              Someone thought they had read a news post saying that it's not good to have
              large number of clusterable things in the JNDI tree because of all the
              replication messages caused by this. True? How many is too many? Thanks.
              

    JNDI replication messages only occur when the state of the JNDI tree changes --
              which is normally at server startup or shutdown. I would recommend pursuing
              this with support as I have been at sites that deployed more EJBs in a cluster
              than this without those problems.
              Joe Herbers wrote:
              > We're starting to try out clustering in WL 5.1 (sp8 on WinNT for now) We're
              > seeing some odd behavior and we're wondering if the cause is related to JNDI
              > replication messages. If we deploy just a couple of clusterable rmi
              > services on two servers in a cluster, things seem to work ok. They maintain
              > a connection to each other and can be viewed with the Admin console.
              >
              > However, if we deploy about 200 clusterable things (mostly EBs that by
              > default have clusterable homes) then things get weird. If we just bring up
              > one server, things aren't too bad. But when we bring up the second server,
              > communication between the two servers is only established briefly before we
              > get a "Timed out server" or something worse.
              >
              > Someone thought they had read a news post saying that it's not good to have
              > large number of clusterable things in the JNDI tree because of all the
              > replication messages caused by this. True? How many is too many? Thanks.
              

  • RMI clustered object...

              Hi all!
              You can create a clusterable RMI object with a -clusterable version and WebLogic
              documentation says the calls will be load balanced (unless -stickToFirstServer
              option is used) and can fail over in case of a problem. But what if the object
              is statefull??? If the method call is load-balanced to another server in the cluster
              the state is lost???
              Thank you very much in advance.
              Dave.
              

    6.1 supports clustering stateful session beans. Use those instead. (Or a
              coherent cache ;-)
              Peace,
              Cameron Purdy
              Tangosol Inc.
              Tangosol Coherence: Clustered Coherent Cache for J2EE
              Information at http://www.tangosol.com/
              "Dave" <[email protected]> wrote in message
              news:3c1702d2$[email protected]..
              >
              > Hi all!
              > You can create a clusterable RMI object with a -clusterable version and
              WebLogic
              > documentation says the calls will be load balanced
              (unless -stickToFirstServer
              > option is used) and can fail over in case of a problem. But what if the
              object
              > is statefull??? If the method call is load-balanced to another server in
              the cluster
              > the state is lost???
              >
              >
              > Thank you very much in advance.
              > Dave.
              

  • Bind RMI object to JNDI

    InitialContext ctx = new InitialContext ();
    ctx.rebind ("wwlhp", remoteObject);Does the JNDI tree and remoteObject reside in the same JVM?
    Can i use JNDI without J2EE platform?
    Can some one give me a piece of code illustrating rebinding in server side and looking up in client side.

    import javax.naming.*;
    import java.util.*;
    public class Server{
    public static void main(String[]args){
    try{
    Hashtable env=new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
    env.put(Context.PROVIDER_URL,"rmi://servername");
    Context ctx=new InitialContext(env);
    //create an instance of remote object
    RemoteIF i=new RemoteImpl();
    ctx.rebind("common name",ri);
    }catch(Exception ex){}
    The client needs to create a context as well, as above, the lookup
    RemoteIF ri=(RemoteIF)ctx.lookup("common name");
    The Stub classes must be available to the client as well
    start rmiregistry
    start the server
    off you go with the client

  • Bind remote object to JNDI tree

    I want to create a JNDI tree in the same JVM with remote object, and then I have two problem:
    1> Should I bind remote object or its stub to the JNDI tree?
    2> How to look up the JNDI tree to get the binded stub from the client side? (Suppose server ip is 192.168.99.42)
    I hope a gentleman would give me a piece of code, so i would be much clearer. Thanks a lot!

    Hi,
    Refer http://java.sun.com/products/jndi/tutorial/objects/storing/remote.html
    -amol

Maybe you are looking for

  • IPod touch fourth generation.

    I have an iPod Touch fourth generation, but the screen has been cracked for a whle now and the bottom half of the screen doesn't respond to my touches. So therefore, I can not unlock/use the iPod. I have rebooted it and restored it to the factory set

  • How to decalre a currency variable

    Hi all, how to declare a currency variable of length 23 and 5 decimal places . please help me

  • Discoverer 10g integration with R12

    Hi, I am installing stand alone Discoverer 10g , no infra and no middle tier, just i want to install Discoverer 10g , my question is---> will it create own own discoverer database , else do i need to integrate with apps , If its not going to create d

  • Dynamic image storing

    Hi guys, i am going to be storing hundreds of user uploaded images, and i was wondering which methode would be better, storing them directly in a SQL database or in an image folder and then automating a path name in a database field, i was starting t

  • Nokia 5610 XpressMusic totally useless

    I purchased this phone due to the camera 3.2 pixels and internet access, unusual at that time. I have had it repaired by Nokia care in Chaing Mai Thailand 3 times. The last time because the camera died, message camera on standby.  They asked me to pa