Clustering JNDI

Hi,
As I'm using clustering of weblogic 7.0, and I know I cannot use ServletContext
for placing objects as it's not replicated via all the servers, I wondered if
I could use Context for that.
If I place objects in the JNDI Context using bind, and I update them using rebind,
will those object and changes be clustered to every node? What should I do for
changes to be propagated?
Does the server's perfomance suffer too much from changing use of JNDI instead
of ServletContext?
Is there any problem for concurrent access to objects in JNDI Context?
I know there's a product called Coherence by Tangosol for using ServletContext
in clustered environments, but I cannot use it as my client does not wanna hear
about more products to be bought. :.-(
Thanks

"Ignacio Sanchez" <[email protected]> wrote in message news:<[email protected]>...
Thanks for your reply,
Anyway, I see one big problem, which is included in that page, in the warning.
Here it is: "Do not use the cluster-wide JNDI tree as a persistence or caching
mechanism for application data. Although WebLogic Server replicates a clustered
server instance's JNDI entries to other server instances in the cluster, those
entries are removed from the cluster if the original instance fails".
So, this does not seem to be the solution.
"SIPTech Community" <[email protected]> wrote:
"Ignacio Sanchez" <[email protected]> wrote:
Hi,
As I'm using clustering of weblogic 7.0, and I know I cannot use ServletContext
for placing objects as it's not replicated via all the servers, I wondered
if
I could use Context for that.
If I place objects in the JNDI Context using bind, and I update them
using rebind,
will those object and changes be clustered to every node? What should
I do for
changes to be propagated?
Does the server's perfomance suffer too much from changing use of JNDI
instead
of ServletContext?
Is there any problem for concurrent access to objects in JNDI Context?
I know there's a product called Coherence by Tangosol for using ServletContext
in clustered environments, but I cannot use it as my client does not
wanna hear
about more products to be bought. :.-(
ThanksHi,
Every server instance in a cluster maintains Clusterwide JNDI Tree
(for clustered
objects).
Binded objects in any cluster server instance will be replicated
in other
server instances just after successful
binding.
Pls. view this URL for more details :
http://edocs.bea.com/wls/docs70/cluster/features.html#1007508
Prema
Many Application Servers make use of caching for the JNDI Tree when
you have more than 1 clone (vertical or horizontal).
If you make use of JNDI in order to store "constant" information, you
need to use just bind /rebind and lookup... but if you want update
frequently a JNDI object you will have to clean this cache by setting
the appropriate property in the JNDI Environment... because you could
experience a dirty (old) value by making a simple lookup.
A sample using IBM WebSphere:
public static final Object lookupEnvEntry(InitialContext ic, String
entryName, boolean clearCache) {
     try {
          if (clearCache) {
               Hashtable env = ic.getEnvironment();
               env.put("com.ibm.websphere.naming.jndicache.cacheobject",
"cleared");
               ic = new InitialContext(env);
          return (String)ic.lookup(entryName.trim());
     } catch (Exception ex) {
          System.out.println("Initial Context: Error retrieving Environment
Entry: " + entryName.trim() + " - " + ex.getMessage());
          return null;

Similar Messages

  • Clustered jndi replication

    Does the replication in clustered jndi also support removing replicate
    bindings
    when you call unbind()?
    When I programmatically bind a value (a String), it is replicated throughout
    the cluster but when I try to unbind it only gets removed on one server.
    Calling rebind with a new value doesn't work either; a message is printed to
    the console saying there is a conflict. Has anyone seen this before and/or
    is there
    something I'm missing.
    This is on weblogic5.1sp4.

    This sounds like a bug.
    I suggest that you file a bug report with our support organization. Be sure
    to include a complete test case. They will also need information from
    you -- please review our external support procedures:
    http://www.beasys.com/support/index.html
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Jonathon Lee" <[email protected]> wrote in message
    news:398b4219$[email protected]..
    Does the replication in clustered jndi also support removing replicate
    bindings
    when you call unbind()?
    When I programmatically bind a value (a String), it is replicatedthroughout
    the cluster but when I try to unbind it only gets removed on one server.
    Calling rebind with a new value doesn't work either; a message is printedto
    the console saying there is a conflict. Has anyone seen this beforeand/or
    is there
    something I'm missing.
    This is on weblogic5.1sp4.

  • Re: Clustering & JNDI

    The JNDI documentation says that only Remote objects can be replicated.
              Excerpts from WL jndi doc:
              Note that you cannot reliably use the naming service to replicate objects.
              For example, if you bind an RMI object "myReplicatedObject" into a
              cluster-wide JNDI tree, and "myReplicatedObject" from Server One places a
              serializable -- but not Remote -- object "myDataObject" into the JNDI tree,
              that unRemoted object does not get replicated to other servers in the
              cluster. If Server One fails and a client calls "myReplicatedObject," the
              RMI service will be available, but its "myDataObject" will not.
              If you need to guarantee access to some data that is produced or used by a
              replicated object, you should store the data in a database so that it can be
              reached by any server in the cluster that is hosting the replicated service.
              An example of this is an entity EJBean.
              Sam Jacob
              GiriBabu <[email protected]> wrote in message
              news:[email protected]...
              > Hi,
              >
              > Has anyone tried putting data objects in a JNDI tree, and then setting
              > up the servers in a clustered environment. The behavior I am seeing is
              > strange.
              >
              > Goal: To cache the same data in all the servers in a cluster
              >
              > Proposed Solution: Put the data in the JNDI tree, so that clients can
              > do a lookup and get the data. Since WL does not synchronize data across
              > the servers in a cluster, manually synchronize all the JNDI trees.
              >
              > In the prototype, I have a startup class, which populates the JNDI tree
              > on the URL passed in as an argument. The startup class is registered in
              > the Cluster-wide properties file.
              >
              >
              > After implementing the prototype, this is the bahaviour I see
              >
              > If I kill one of the servers, the client gets an exception, when he does
              > a lookup on a live server.
              >
              > It appears that the dying server is taking away all the JNDI entries
              > that it put in its JNDI tree, from all the other JNDI trees in the
              > cluster too.
              >
              >
              > Am I assuming something wrong? I want to create separate copies of the
              > data objects in each JNDI tree.
              >
              > Thanks ,
              > Vijay
              >
              >
              >
              >
              >
              >
              >
              

    Sam wrote:
              > The JNDI documentation says that only Remote objects can be replicated.
              > Excerpts from WL jndi doc:
              > Note that you cannot reliably use the naming service to replicate objects.
              > For example, if you bind an RMI object "myReplicatedObject" into a
              > cluster-wide JNDI tree, and "myReplicatedObject" from Server One places a
              > serializable -- but not Remote -- object "myDataObject" into the JNDI tree,
              > that unRemoted object does not get replicated to other servers in the
              > cluster. If Server One fails and a client calls "myReplicatedObject," the
              > RMI service will be available, but its "myDataObject" will not.
              >
              > If you need to guarantee access to some data that is produced or used by a
              > replicated object, you should store the data in a database so that it can be
              > reached by any server in the cluster that is hosting the replicated service.
              > An example of this is an entity EJBean.
              >
              >
              > Sam Jacob
              >
              An entity bean is always a good option, but what happens if you want to
              replicate the information in memory for the highest performance?
              

  • 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

  • Singletons and clusters

    Hi,
    Does anyone have any idea on what to do with singletons on a cluster ?
    Right now we have 3 singleton, main business objects that handle core
    method calls.
    If we decide to cluster , how do we deal with singletons across clusters
    -Sam

    Does anyone have any idea of the performance implications of moving singleton
    objects to RMI objects for clustering ?
    We have an Environment Object that is encapsulated in a Servlet so that PageObjects
    can be loaded at startup. I could easily make the Environment Object an RMI object
    but I would be creating extra network traffic from each cluster participant.
    thanks
    Joe Ryan
    Don Ferguson wrote:
    Rickard Öberg wrote:
    Hey
    Bytecode wrote:
    My point exactly.
    A singleton replicated ?? Isnt that a conradiction in terms ??
    What state are these different instances going to be in ?? Excatly identical
    at all points of time ??If I understood Don right it's the stub that will be replicated. Not
    the RMI-object. So all stubs in the clustered JNDI-tree will point to
    the same RMI-object.
    /RickardYes, that's the idea.
    -Don

  • Managing Configuration Information using JNDI

    I'm considering using JNDI to manage our application configuration. Can
    you please comment on these design ideas?
    The Admin. server will master the configuration. The nodes will connect
    to the Admin. server's JNDI and create a copy of the configuration
    context in the local JNDI (anyone know any easy way to do this?).
    (I can't use auto. replication, if the admin. server goes down the node
    servers will unbind the config. information.)
    The nodes will register as NamingListeners to the Admin. server's JNDI.
    When a property changes in the Admin. JNDI, the nodes will automatically
    pick it up.
    I'm worried about when the Admin. server goes down. Do I have to
    re-register the nodes as NamingListeners?
    In a nutshell, my two questions are:
    1) How can I easily copy an entire context between two JNDI trees?
    2) How do I deal with the Admin. server going down (it does happen)?
    Thanks,
    Bob

    Bob Lee <[email protected]> wrote:
    Actually, that would be excellent. Do either of these implement what I'm
    talking about (clustered JNDI with local caches), or would I have ot use
    one of these to implement it myself?No, but you will get replication in the cluster. I've used JavaGroups to
    replicate JMX configuration and it worked pretty well.
    I'd really like to use JNDI for the interface. It's standard (nothing
    new for other developers to learn), it decouples the clients from the
    underlying storage implementation, and it has the notion of contexts
    built in which I really need.
    Thanks,
    Bob
    Dimitri I. Rakitine wrote:
    Why don't you simply use Tangosol product or Javagroups for this ?
    Bob Lee <[email protected]> wrote:
    I'm considering using JNDI to manage our application configuration. Can
    you please comment on these design ideas?
    The Admin. server will master the configuration. The nodes will connect
    to the Admin. server's JNDI and create a copy of the configuration
    context in the local JNDI (anyone know any easy way to do this?).
    (I can't use auto. replication, if the admin. server goes down the node
    servers will unbind the config. information.)
    The nodes will register as NamingListeners to the Admin. server's JNDI.
    When a property changes in the Admin. JNDI, the nodes will automatically
    pick it up.
    I'm worried about when the Admin. server goes down. Do I have to
    re-register the nodes as NamingListeners?
    In a nutshell, my two questions are:
    1) How can I easily copy an entire context between two JNDI trees?
    2) How do I deal with the Admin. server going down (it does happen)?
    Thanks,
    Bob
    Dimitri

  • JNDI replication\lookup problems

              Hi,
              We have a WL5.1 SP12 cluster that until today consisted of 2 Solaris boxes running
              8 WL instances on the 2.6 OS.
              Today we attempted to add a third Solaris box, running 2 SP12 WL instances on the
              2.8 OS. These two new instances were identical to the other 8 in all respects apart
              from one ejb jar which they did not deploy (because of Solaris 2.8\JNI\JDK1.3.1 incompatiblilities).
              We figured that these new JVM could lookup this bean via the clustered JNDI and execute
              on one of the original 8 JVMs, so we did not deploy on these new servers. This worked
              fine on test (a 3 way cluster, on one box running Solaris 2.8 and SP10).
              However when we cut the new box in this morning we got javax.naming.NameNotFoundExceptions
              from the new JVMs.
              These new JVMs apeared to start fine, and everything looked as it should on the console,
              but still the error.
              so :
              what could it be :
              OS related - a clustering spanning 2.6 and 2.8 OSs
              SP 12 related ?
              Anybody encountered anything like this before ?
              Thanks in advance.
              Justin
              

              Yes, the EJB classes are in the server classpath.
              I assumed that JNDI replication occured as a resulting of enabling clustering.
              "Sabha" <[email protected]> wrote:
              >Are the ejb home/remote interfaces in the server classpath of the 2 newer
              >JVMs? Is jndi replication turned off?
              >
              >-Sabha
              >
              >"Justin" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >>
              >> We have a WL5.1 SP12 cluster that until today consisted of 2 Solaris boxes
              >running
              >> 8 WL instances on the 2.6 OS.
              >>
              >> Today we attempted to add a third Solaris box, running 2 SP12 WL instances
              >on the
              >> 2.8 OS. These two new instances were identical to the other 8 in all
              >respects apart
              >> from one ejb jar which they did not deploy (because of Solaris
              >2.8\JNI\JDK1.3.1 incompatiblilities).
              >> We figured that these new JVM could lookup this bean via the clustered
              >JNDI and execute
              >> on one of the original 8 JVMs, so we did not deploy on these new servers.
              >This worked
              >> fine on test (a 3 way cluster, on one box running Solaris 2.8 and SP10).
              >>
              >> However when we cut the new box in this morning we got
              >javax.naming.NameNotFoundExceptions
              >> from the new JVMs.
              >>
              >> These new JVMs apeared to start fine, and everything looked as it should
              >on the console,
              >> but still the error.
              >>
              >> so :
              >>
              >> what could it be :
              >>
              >> OS related - a clustering spanning 2.6 and 2.8 OSs
              >> SP 12 related ?
              >>
              >> Anybody encountered anything like this before ?
              >>
              >> Thanks in advance.
              >>
              >> Justin
              >>
              >>
              >>
              >
              >
              

  • Singleton serialization and weblogic - help!

    hi everyone,
    I'm trying to serialize a singleton cache object we're using for our (intranet)
    website running on weblogic 6.1. I've made sure the singleton class
    implements serializable, and i've also put the following method in the
    singleton class (ChartCache.java):
    private Object readResolve()
    return theInstance; //which is of type ChartCache
    By the way I'm using jdk 1.3. I've trawled the web and can't find anything to help me yet...
    Basically I've written a jsp to get the current instance of the cache
    and serialize it to a file. When I invoke another jsp i want it to
    reinflate the object and place it back into the weblogic jvm so it can
    once again be accessed as a singleton by all classes in the webapp. At
    the moment its just not working - the cache object will eventually
    take over half an hour to create (huge database processing going on)
    so I want the option, if weblogic falls over, to reinstantiate the
    cache without having to rebuild it from scratch. The cache will only
    be refreshed once a day.
    I'll c&p my jsp code below...
    ======================= restoreCache.jsp
    <%@ page import = "java.util.*" %>
    <%@ page import = "java.io.*" %>
    <%@ page import = "com.drkw.agencylending.website.chartcache.*" %>
    <%@ page import = "com.drkw.agencylending.log.Logger" %>
    <%
    ChartCache theCache = null;
    try
    String filename = "chartCache.dat";
    FileInputStream fis = new FileInputStream(filename);
    ObjectInputStream in = new ObjectInputStream(fis);
    theCache = (ChartCache)in.readObject();
    in.close();
    catch(Exception e)
    Logger.log(e);
    %>
    Resurrected chart cache from file.
    ======================= saveCache.jsp
    <%@ page import = "java.util.*" %>
    <%@ page import = "java.io.*" %>
    <%@ page import = "com.drkw.agencylending.website.chartcache.*" %>
    <%@ page import = "com.drkw.agencylending.log.Logger" %>
    <%
    ChartCache theCache = ChartCache.getInstance();
    String fileName = "chartCache.dat";
    try
    FileOutputStream fos = new FileOutputStream(fileName);
    ObjectOutputStream oos = new ObjectOutputStream(fos);
    oos.writeObject(theCache);
    oos.flush();
    oos.close();
    catch(Exception e)
    Logger.log(e);
    %>
    Wrote cache object to file.
    ============================
    At the moment, a file is getting written but it seems suspiciously
    small (73 bytes!) for what is a very large object. When I try to load
    it up again, I get no errors but when I call ChartCache.getInstance()
    (my singleton) it recreates the cache rather than using the one I've
    reinflated. BTW I don't need to worry about server clustering/JNDI to
    ensure I have a truly singleton instance - there will only ever be one
    JVM to worry about.
    Any help greatly appreciated!

    solved the problem using another technique. Rather
    than serialize the entire singleton object, I just
    serialized the hashmap (the only bit I really care
    about). Then in the private constructor, the class
    checks a database flag to see whether the singleton
    was created today - if not, I refresh the cache,
    otherwise load in the serialized hashmap and set that
    as my class member. No complicated jndi/ejb registry
    needed to get around it..!singleton serialization is not recommended in ejb enviroment, it will cause problems. in what you are doing, it is far better to persist the data values in a database.
    just for the sake of writing a serializable sington: in addition to what you do in a regular object, you would first check to see if this obj has been serialized, if it is, deserialize it and return this one. you would have to write your own method to do serialization, making sure you have only one place to serialize it, and let the object know where the file is.

  • Conflict Handler Start (Attn: Rob Wollen)

    Hi,
              We have functionality for user sessions, which needs to be shared in
              a cluster. We do the following
              a). Implement a entity bean, which represents the user session. This
              entity bean is created when the user logs in and remains alive as long
              as
              the weblogic cache keeps it around. (We do not persist this entity bean
              ex., EJBStore does not do anything).
              b). We have 2 windows NT machines.
              On each machine we run a pair of weblogic servers.
              ex., Machine A has server 1,2
              Machine B has server 3,4
              Servers 1,3 run on cluster mode, where as servers 2,4 do not
              run within the cluster. Also in servers 1,3 nothing is deployed, Only in
              servers 2,4 the UserSessionEJB is deployed.
              c). When a user logs in, Let us say he contacts server 2, an instance of
              UserSessionEJB is created on server 2 with a primary key of user_id.
              Also
              the user_id, instance is bound in the clustered jndi tree (servers 1,3).
              Next time the user logs in, our code checks in the clustered jndi tree,
              to see
              if there is a instance bound for a particular user_id, If so it retrieves
              the session
              and talks to the particular session.
              Currently we are getting the following problem,
              Occasionally the cluster servers would produce the following error
              message.
              Conflict Handler start....
              After that our servers start behaving erratically. I am not sure,
              what is
              going on?, Can anyone shed some light on this. See attached weblogic.log
              file
              for the clustered jndi tree servers.
              Thanks,
              -Venkat.
              [weblogic.log]
              

    Were the RMI objects compiled with the the WebLogic rmic "-clusterable" option?
              Stephen Earl wrote:
              > Hi,
              >
              > <<<
              > (the only time this is
              > > not considered a conflict is when the objects are RMI objects -- e.g., an
              > EJB
              > > Home).
              > >>>
              >
              > This is strange because the objects that seem to be causing the
              > ConflictHandler message are RMI objects.
              >
              > Steve...
              >
              > Robert Patrick <[email protected]> wrote in message
              > news:[email protected]...
              > > Stephen,
              > >
              > > ConflictHandlers are there to resolve conflicts in the naming tree. For
              > > example, if you create a normal serializable Java object in one of your
              > servers
              > > and try to bind it into JNDI, a copy of the object will be made and bound
              > into
              > > the each server's JNDI tree. Therefore, if you deploy this "binding of
              > the
              > > object" in all servers in the cluster, the second server will be trying to
              > > create this object and bind it into the tree with the same name as the
              > > replicated object that was created by the first server (the only time this
              > is
              > > not considered a conflict is when the objects are RMI objects -- e.g., an
              > EJB
              > > Home).
              > >
              > > If you do not want the object being bound into JNDI to be replicated,
              > there is a
              > > property you can pass to the InitialContext constructor that will prevent
              > any
              > > object bound via that context from being replicated. The property is
              > defined on
              > > the weblogic.jndi.WLContext class as the constant (i.e., static final)
              > > REPLICATE_BINDINGS and setting this to false will prevent the replication
              > of the
              > > bindings.
              > >
              > > Hope this helps,
              > > Robert
              > >
              > > Stephen Earl wrote:
              > >
              > > > Well... I want to know exactly what the ConflictHandlers are doing.
              > > >
              > > > Steve...
              > > >
              > > > "Venkat Krishnamoorthy" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > > Steve,
              > > > > I am not clear on ur posting, can u clarify?
              > > > >
              > > > > Thanks,
              > > > > -Venkat.
              > > > >
              > > > > Stephen Earl wrote in message <[email protected]>...
              > > > > >This isn't a solution... instead another question.
              > > > > >
              > > > > >What exactly are the ConflictHandlers doing??? I only want HTTP
              > sessions
              > > > > >replicated in the cluster all other services should be pinned to the
              > WL
              > > > > >instance in which they were instanciated or started. Are the
              > > > > >ConflictHandlers handling some replication across the cluster???
              > > > > >
              > > > > >Steve...
              > > > > >
              > > > > >"Venkat Krishnamoorthy" <[email protected]> wrote in message
              > > > > >news:[email protected]...
              > > > > >> Hi,
              > > > > >>
              > > > > >> We have functionality for user sessions, which needs to be
              > shared
              > > > in
              > > > > >> a cluster. We do the following
              > > > > >>
              > > > > >> a). Implement a entity bean, which represents the user session.
              > This
              > > > > >> entity bean is created when the user logs in and remains alive
              > as
              > > > > long
              > > > > >> as
              > > > > >> the weblogic cache keeps it around. (We do not persist this
              > entity
              > > > > >bean
              > > > > >> ex., EJBStore does not do anything).
              > > > > >>
              > > > > >> b). We have 2 windows NT machines.
              > > > > >> On each machine we run a pair of weblogic servers.
              > > > > >> ex., Machine A has server 1,2
              > > > > >> Machine B has server 3,4
              > > > > >>
              > > > > >> Servers 1,3 run on cluster mode, where as servers 2,4
              > do
              > > > not
              > > > > >> run within the cluster. Also in servers 1,3 nothing is
              > deployed,
              > > > Only
              > > > > >in
              > > > > >> servers 2,4 the UserSessionEJB is deployed.
              > > > > >>
              > > > > >> c). When a user logs in, Let us say he contacts server 2, an
              > instance
              > > > > of
              > > > > >> UserSessionEJB is created on server 2 with a primary key of
              > > > user_id.
              > > > > >> Also
              > > > > >> the user_id, instance is bound in the clustered jndi tree
              > (servers
              > > > > >1,3).
              > > > > >>
              > > > > >> Next time the user logs in, our code checks in the clustered
              > jndi
              > > > > >tree,
              > > > > >> to see
              > > > > >> if there is a instance bound for a particular user_id, If so it
              > > > retrieves
              > > > > >> the session
              > > > > >> and talks to the particular session.
              > > > > >>
              > > > > >> Currently we are getting the following problem,
              > > > > >>
              > > > > >> Occasionally the cluster servers would produce the following
              > error
              > > > > >> message.
              > > > > >>
              > > > > >> Conflict Handler start....
              > > > > >>
              > > > > >> After that our servers start behaving erratically. I am not
              > > > sure,
              > > > > >> what is
              > > > > >>
              > > > > >> going on?, Can anyone shed some light on this. See attached
              > > > weblogic.log
              > > > > >> file
              > > > > >>
              > > > > >> for the clustered jndi tree servers.
              > > > > >>
              > > > > >> Thanks,
              > > > > >> -Venkat.
              > > > > >>
              > > > > >>
              > > > > >>
              > > > > >
              > > > > >
              > > > >
              > > > >
              > >
              

  • Clustered Remote Object Bound To JNDI

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

    Hello,
              I'd like to know if Weblogic 5.1 (service pack 10) supports
              clusterable remote objects.
              What I am trying to do is to implement a remote object that extends
              UnicastRemoteObject interface and bind it to JNDI. When the client
              needs the services, it will lookup that object in JNDI and call its
              methods remotely.
              What happens to my test implementation is that it all works well when
              I run Weblogic locally, but if it is run on the remote server, it
              gives me the exception to the extend that the stub for my remote
              object is not found (although it is in the classpath). I understand
              that this is because I should be using weblogic.rmic instead of
              regular rmic, is that right?
              Thanks,
              Eugene Kononov.
              

  • JNDI lookup in Multitired clustered architecture

    Hi alll,
    We are in the design phase of a multi tired clustered application.
    This application has jsp/servelet cluster and business application cluster. We are confused abt the JNDI lookup logic need to use in servlet cluster.
    Can anyone help me to find out an optimal solution for jndi which gives the complete advantage of load balancing and esp. fail over
    of clustering
    Thanks in advance
    gokul

    Hi,
              First of all, I would like to clear the point that load balancing can be done within a cluster not among the cluster.
              So if you have more than one cluster the load balancing
              would be at each cluster level.
              For JNDI lookup you have to provide cluster address i.e combination of Managed Server Address e.g:
              t3://localhost:7001,localhost:8001,localhost:9001...etc
              Thanks,
              Qumar

  • JNDI lookup in a clustered environment

              Hi,
              I have deployed my application on a clustered environment containing one admin
              server and two managed servers. The application is deployed on the managed servers.
              We have a DNS for these two managed servers.
              Currently, I am using t3:localhost:portnumber to get an initial context for JNDI
              lookup.
              But this will not provide perfect load balancing, since each server side component
              (EJB) will lookup for a needed component on the same server itself.
              Is there any way to get the Initial Context by using the DNS name?
              I tried t3:DNSName (Our DNS is created till the port number. e.g. http://DNS points
              to http://Managedserver1:portnumber and http://Managedserver2:portnumber
              It works, but is random. Sometimes, it gives me the following exception:
              Root exception is java.net.ConnectException: t3://DNS Name: Destination not
              reachable using: 't3'
              Could someone help me figure out a way to do this in a better way?
              Thanks,
              Aparna
              

              If you don't want or have money to use external load balancers you should be using
              the DNS entry as t3://server1:port,server2:port (you indicated you are using http.
              Also make sure your network elements between the client and the servers allow
              t3 protocol if there is packet filtering).
              S
              "Aparna" <[email protected]> wrote:
              >
              >Hi,
              >
              >I have deployed my application on a clustered environment containing
              >one admin
              >server and two managed servers. The application is deployed on the managed
              >servers.
              >We have a DNS for these two managed servers.
              >
              >Currently, I am using t3:localhost:portnumber to get an initial context
              >for JNDI
              >lookup.
              >But this will not provide perfect load balancing, since each server side
              >component
              >(EJB) will lookup for a needed component on the same server itself.
              >
              >Is there any way to get the Initial Context by using the DNS name?
              >
              >I tried t3:DNSName (Our DNS is created till the port number. e.g. http://DNS
              >points
              >to http://Managedserver1:portnumber and http://Managedserver2:portnumber
              >
              >It works, but is random. Sometimes, it gives me the following exception:
              > Root exception is java.net.ConnectException: t3://DNS Name: Destination
              > not
              >reachable using: 't3'
              >
              >Could someone help me figure out a way to do this in a better way?
              >
              >Thanks,
              >Aparna
              

  • Can a single JNDI tree be shared by multiple, non-clustered servers?

    We have a situation involving multiple, but non-clustered, WebLogic servers,
    say Server 1 and Server 2. A client needs to access an EJB which happens to
    be located only on Server 2. We would prefer that the client not need to
    know the exact location of the EJB, but use the naming service hosted by a
    designated server (Server 1) to locate the EJB.
    At a minimum, this would require that both servers bind their respective
    EJB's into a common, shared JNDI naming tree hosted by Server 1.
    Is this possible?
    John Armstrong
    WebLink Wireless, Inc.
    [email protected]

    hi,
    I have not tried this, althoug with the webogic rmi and weblogic jndi
    implementation I would guess this is straightforward.
    Binding remote objects in WL JNDI binds the stubs only, not the object
    itself. The worst case scenario here would be for you to implement proxies
    and bind them in JNDI, although I would guess that binding the home object
    should give you the required functionality.
    Just try it, rebind the home object on a different server than the one the
    bean is deployed on and test. My guess is that it will work.
    (I repeat : I have not tested this my self, this is just a suggestion)
    Regards,
    Anders M.
    John N. Armstrong <[email protected]> skrev i
    meldingsnyheter:3a93faba$[email protected]..
    We have a situation involving multiple, but non-clustered, WebLogicservers,
    say Server 1 and Server 2. A client needs to access an EJB which happensto
    be located only on Server 2. We would prefer that the client not need to
    know the exact location of the EJB, but use the naming service hosted by a
    designated server (Server 1) to locate the EJB.
    At a minimum, this would require that both servers bind their respective
    EJB's into a common, shared JNDI naming tree hosted by Server 1.
    Is this possible?
    John Armstrong
    WebLink Wireless, Inc.
    [email protected]

  • JNDI clustering

    When I do a:
              Context context = new InitialContext();
              In a clustered environment, will that connect to the cluster JNDI or the
              localhost JNDI?
              We need to make sure whenever our stateless session beans get a handle
              to the context, it is the localhost JNDI, Is there a way to do this if
              the answer to the above question is the cluster?
              The problem we have is we are binding local objects into JNDI, each
              server in the cluster needs to get references to one of these objects
              (the stateless session bean needs to do a lookup and get a reference).
              So our code looks something like this:
              public class MyStatelessSessionBean implements SessionBean
              public void myRemoteCall(...) throws RemoteException
              Context context = new InitialContext();
              MyLocalObject object = (MyLocalObject)context.lookup("MyObject");
              We need to ensure that the MyLocalObject that is returned is one from
              the localhost, not one in the cluster.
              thanks,
              -chris
              

    On the server if you do a Context ctx = new InitialContext() it will return you
              local initial context. So, your lookup will be local.
              Instead if you use a dns cluster name then the first server name that dns server
              returns will be used to connect and get an initial context if you are on a
              standalone client.
              Environment env = new Environment();
              env.setProviderUrl("t3://fooclust:7001");
              Context ctx = env.getInitialContext()
              When you do a lookup in the jndi tree, what you get back depends on the server
              configuration and doesn't depend on where you look if you are in a homogenous
              cluster.
              - Prasad
              Chris Humphrey wrote:
              > Thanks for the reply. We are currently using the Referenceable interface to
              > store and get objects from jndi, so the objects are not serializable.
              >
              > It sounds like I have a problem to fix here, let me recap to make sure I
              > understand. If the bean was accessed with a DNS cluster for the context, I
              > will get back a reference to the cluster, if the bean was accessed using
              > 'localhost' I will get back a reference to the jndi running locally.
              >
              > This was what I was afraid of. Is there a way to forceably get an initial
              > context to the localhost jndi?
              >
              > Thanks again for the reply.
              > -chris.
              >
              > Wei Guan wrote:
              >
              > > Comments inline
              > >
              > > --
              > > Hope it helps.
              > >
              > > Cheers - Wei
              > >
              > > "Chris Humphrey" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > When I do a:
              > > >
              > > > Context context = new InitialContext();
              > > >
              > > > In a clustered environment, will that connect to the cluster JNDI or the
              > > > localhost JNDI?
              > > In cluster, JNDI tree is "replicated JNDI tree". Every server in the
              > > cluseter has the same "replicated JNDI tree".
              > > " Context context = new InitialContext();" will give you reference to the
              > > JNDI tree in the same JVM as the caller's.
              > >
              > > >
              > > > We need to make sure whenever our stateless session beans get a handle
              > > > to the context, it is the localhost JNDI, Is there a way to do this if
              > > > the answer to the above question is the cluster?
              > > >
              > > > The problem we have is we are binding local objects into JNDI, each
              > > > server in the cluster needs to get references to one of these objects
              > > > (the stateless session bean needs to do a lookup and get a reference).
              > > >
              > > > So our code looks something like this:
              > > >
              > > > public class MyStatelessSessionBean implements SessionBean
              > > > {
              > > > public void myRemoteCall(...) throws RemoteException
              > > > {
              > > > Context context = new InitialContext();
              > > > MyLocalObject object = (MyLocalObject)context.lookup("MyObject");
              > > > }
              > > > }
              > > >
              > > > We need to ensure that the MyLocalObject that is returned is one from
              > > > the localhost, not one in the cluster.
              > > If your "MyObject" is a serializable object, serializable objects binding
              > > the JNDI tree will be replicated. That is, "MyObject" will have a copy on
              > > each server's JNDI tree. Since you get JNDI reference from localhost, your
              > > lookup("MyObject") will get the copy in the same JVM.
              > >
              > > >
              > > > thanks,
              > > > -chris
              > > >
              

  • 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.
              

Maybe you are looking for

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans CA Forum: General Crystal 10 u2013 SQL 2000 I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, et

  • Button's Destination URI is not working

    Hi, I have a requirement to keep a button(View Invoice) on a custom notification page. Whenever the button is clicked, it needs to open a new page(not OA.jsp) to show the invoice image. I used Item Style as Button and in the controller, setDestinatio

  • Suddenly lost ability to receive some emails

    I have suddenly lost the ability to recieve emails from my school. I am in school online and cannot receive forum posts to my email. All was fine and then suddenly they stopped coming in. I usually get 15 or 20 per day as thet are part of a thread. I

  • About over delivery process

    Hi, experts I would like to know how to deal with over delivery to customer in sap as standard process?

  • PL/I compiler for Linux?

    Hello there, I have lately found a book about PL/I that aroused my interest in that language. Now I want to know if there exists a free (as in "costs no money", but free as in "open source" would be even better, of course) compiler for that old langu