JNDI and clustering

All,
          What happens with naming services in a clustered environment?
          Is the naming service dupilcated across all servers in the cluster or
          are they other approaches?
          How is this configured?
          What is the effect on the client when requesting the initial context ina
          clusteerd environment?
          Thanks in advance
          Aaron
          

Aaron Robinson wrote:
          > All,
          >
          > What happens with naming services in a clustered environment?
          > Is the naming service dupilcated across all servers in the cluster or
          > are they other approaches?
          >
          Anything you bind into the jndi tree will be replicated.
          > How is this configured?
          Nothing to configure. It is automatic when you start servers in a
          cluster.
          > What is the effect on the client when requesting the initial context ina
          > clusteerd environment?
          None.
          >
          > Thanks in advance
          > Aaron
          Cheers
          - Prasad
          

Similar Messages

  • What is the recommended way of connecting to repository out of WebDAV, RMI, JNDI and JCA connector ?

    What is the recommended way of connecting to repository out of WebDAV, RMI, JNDI, and JCA connector possibilities provided by CQ 5.5?

    Hi dp_adusumalli,
    I recognized your list of ~8 questions you posted at around the same time, as I received that same list in our customer implementation from Arif A., from the India team, visiting San Jose. :-)
    I provided him feedback for most of the questions, so please check back with Arif for that info.
    For this particular question, can you provide specifics for the types of interactions you are interested in?
    Understanding the kinds of things you need to achieve will help determine which of the CQ/CRX interfaces is best suited for the task(s).
    I've collated a few points on this subject on this page:
    Manipulating the Adobe WEM/CQ JCR
    Regards,
    Paul

  • Help please: re proper use of JNDI and Directory services

    I'm new to this J2EE/JDev stuff and have spent a few days pouring over Sun's JNDI and J2EE documentation as to how best to accomplish my task. Here's the big picture. I am constructing a web site in my PC at home for eventual deployment in an ISP server. I don't have an LDAP or COS server but ISPs usually do. I've found a public LDAP server I can use but the problem is getting an entry on the server that my JSP client and EJB server code can use to find my Entity bean and SQLServer database server respectively. The best I've been able to come up with is that I need to write my own Applet or client application to register my entries on that LDAPserver with appropriate Java attributes and then code my stuff to look it up using the DirContext class.
    As for how I pass my stuff into my EJB bean, I intend to use jndi.properties to specify custom properties that map logicals to the physical resources that DirContext routines act on and use System.getProperty("...") to retrieve them dynamically without having to recode later. I haven't figured out exactly how to do this for Servlets and JSPs yet so they can find the beans.
    I'm interested in any feedback to what I'm doing and how better to achieve my ends.
    As an aside, I noticed as I poured through Sun's J2EE container software that they seem to have embedded COS in their deploytool as a nice feature that would effectively solve my problem if JDeveloper could integrate such a capability. Their sample programs were pretty straight-forward in configuring JDBC and the beans. Any thoughts from the JDev team on providing a similar capability for OC4J?
    Thanks,
    Dean

    I would first left-click with the mouse on the camera icon (to enable/activate the snap shot feature), then I'd go with the mouse to the area I wanted to take the snapshot, click-and-drag so I would box-in the desired area to be copied/duplicated, then let go off the mouse (a ding wound then sound) and finally I would go to the page where I wanted to reproduce the snapshotted and left-click once with the mouse... And presto!
    Not so with 11-Pro. It allows me to paste onto a different program such as MS-Word (or Outliok), but not onto a PDF page.
    ⚽ is☝

  • Configure JNDI and deploy crystal report in Infoview

    Hi all,
    I am trying to create a JNDI context and use it while generating a
    crystal report.Now this report is deployed in Business Objects XI R3.1 Edge repository so users can view them through Infoview. The main reason I wanted to use JNDI is so I dont need to specify the database connection credentials in every report.
    Issue is that I am not able to figure out the process to achieve this. I created a JNDI in tomcat as per instructions in the one of the SAP notes but there is no information of how to configure the same in CMC / Infoview. If I can get information on how to
    1. configure crconfig.xml (if need be) for jndi or specify jndi while creating connection in crystal report
    2. configure the JNDI in CMC or Infoview so that we dont have to specify the db connection credentials for every report
    that would be great.
    we are using crystal reports 2008 sp1.
    thanks
    Joe.
    Edited by: Joe P Kumar on Jan 31, 2011 5:30 PM

    I guess I found the issue. I was missing weblogic.jar in the classpath. After adding this, it worked.
    Just noting the steps so anyone who comes here could be benefited. This is for Weblogic app server using Oracle 10g and Crystal reports 2008
    1. Open CRConfig.xml in C:\Program Files\Business Objects\common\4.0\java
    2. Inside <DataDriverCommon> and <Classpath> add the path of your ojdbc and weblogic jars
    3. For the JDBC tag, the entry would be like. The <JNDIUserName> tag should reference your weblogic app server user. This is generally the userid you would use to login to weblogic console.
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL>jdbc:oracle:thin:<db_user_name>/<db_pwd>@<server_where_db_runs>:1521/<SID></JDBCURL>
         <JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
         <JDBCUserName><db_user_name></JDBCUserName>
            <JNDIURL>t3://localhost:7001</JNDIURL>
         <JNDIConnectionFactory>weblogic.jndi.WLInitialContextFactory</JNDIConnectionFactory>
         <JNDIInitContext>/</JNDIInitContext>
         <JNDIUserName>weblogic</JNDIUserName>
         <GenericJDBCDriver>
              <Default>
                   <ServerType>UNKNOWN</ServerType>
                   <QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>Standard</LogonStyle>
              </Default>
              <Sybase>
                   <ServerType>SYBASE</ServerType>
                   <QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
                   <DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>MySQL</LogonStyle>
              </Sybase>
         </GenericJDBCDriver>
    </JDBC>
    4. Open Crystal reports designer and when you create a new connection, choose JDBC / JNDI
    5. In the pop-up choose JNDI (you will see the values for Provider URL, username and context as how you specified in the CRConfig.xml file). Specify the password for weblogic user
    6. Hit next and it should show you the available jndi
    7. Choose a JNDI and create the report
    8. Enjoy.

  • Session Failover and Clustering

              Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4 machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
              When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
              Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
              Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending the response (does AS2 automatically become the secondary)?
              Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout error message?
              Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
              Thank you very much for your help!
              Giri
              

              Thank you very much for your responses. It has been very helpful and I am clear on the session/clustering stuff. I have new questions on EJB and clustering which I will post as a separate thread.
              Giri
              "Jason Rosenberg" <[email protected]> wrote:
              >And also, if the browser has cookies disabled, it is important for
              >the app server to embed the WebLogicSession info via url rewriting,
              >otherwise the proxy or NES will not be able to route the session
              >properly.
              >
              >So, in all http responses, be sure to pass the url string through
              >response.encodeURL(). This will do the right thing depending
              >on whether cookies are enabled or not.
              >
              >I've just only recently figured this out. Haven't actually tried it
              >all out yet, so forgive me if it is not quite this simple, but this
              >seems to be the gist of it...
              >
              >Jason
              >
              >
              >"Justin James" <[email protected]> wrote in message news:[email protected]...
              >>
              >> Giri,
              >>
              >> I'm not a weblogic representative, but I tried to replicate this proxing service inside a load balancing switch(BigIP) and I
              >discovered a few things. The weblogic server sets a cookie (WebLogicSession)that the webserver plugin uses to manage the proxying.
              >The cookie (found in the HTTP header information) contains encoded information about the primary and secondary application servers
              >that the session is bound too. Any web server can read the cookie to determine how to dispatch the request to the primary server.
              >If the primary server does not respond, the request is forwarded to the secondary server by the plugin. Regardless of cluster size,
              >the session is replicated to only one other server.
              >>
              >> <[email protected]> wrote:
              >> >Giri Alwar wrote:
              >> >
              >> >> I need a couple of clarifications. First with regard to Question 1, I understand that plugins provide load balancing and
              >failover but what I really was asking is how the plugin in WS2 knows that a session for the client has been initiated in AS1 as a
              >result of WS1 sending the initial request to AS1. If WS2 gets a future request from the client, it needs to know this to send the
              >request to AS1. Does the plugin talk to the cluster to find out if there is a primary and who it is?
              >> >>
              >> >
              >> >> I should have clarified that my other questions pertain to in-memory replication. If I do not persist the session in a database
              >then does the client get an error message (timeout) when AS1 goes down (assuming we use NES with the WebLogic plugin)?
              >> >
              >> >Plugins' know how to route requests based on cookies. If it can't reach the primary server it will automatically try secondary.
              >In your case it doesn't matter if it reaches to proxy 1 or proxy 2, it is still the same.
              >> >
              >> >- Prasad
              >> >
              >> >> To prevent this error message and achieve failover, do I need to use WebLogic as the proxy server? If so, why isn't the NES
              >plugin doing this?
              >> >
              >> >> Thanks.
              >> >> Giri
              >> >>
              >> >> Prasad Peddada <[email protected]> wrote:
              >> >> >Giri Alwar wrote:
              >> >> >
              >> >> >> Let's say that we have two WebServers (NES) with the weblogic plugin (say WS1 and WS2) and a cluster with two
              >WebLogicCommerce AppServers (say AS1 and AS2). Let's assume that each WebServer and AppServer runs on its own machine (total: 4
              >machines). Now, let's assume that the WebServer "obj.conf" files (on both WS1 and WS2) are setup so that they point to the servers
              >in the cluster (WebLogicCluster="AS1:7601,AS2:7601").
              >> >> >>
              >> >> >> When a new request comes in to one of the WebServers (say WS1), the plugin will route it to one of the AppServers using
              >Round-Robin (say AS1). A session will now be initiated in AS1 and it sends a response back to the client.
              >> >> >>
              >> >> >> Question 1: How does the other proxy in WS2 know that all future requests for this client need to be forwarded to AS1?
              >> >> >
              >> >> > Plugin takes care of load balancing and failover, it is all transparent to the client.
              >> >> >
              >> >> >
              >> >> >> Question 2: For failover, does the cluster automatically replicate the session state existing in AS1 onto AS2 before sending
              >the response (does AS2 automatically become the secondary)?
              >> >> >
              >> >> > If you have only two yes it is automatically your secondary. Yes, replication is synchronous.
              >> >> >
              >> >> >>
              >> >> >> Now let's assume that AS1 crashes/dies. When the next request from the client comes to WS1 or WS2, they will forward it to
              >AS1 (assuming that WS2 knows about the client session in AS1) . Since AS1 has crashed, will the client eventually get a timeout
              >error message?
              >> >> >
              >> >> > If you are using some kind of persistence then you will be able to retrieve the session information and since the server
              >is not available the request will automatically failover.
              >> >> >
              >> >> >> Question 3: To ensure that the session failover happens so that AS2 gets the request instead (becomes the primary), do we
              >need to setup a WebLogic Proxy Server? If so, why can't the plugins for NES provide the failover themselves?
              >> >> >
              >> >> > No, you need only one. Either NES or weblogic proxy.
              >> >> >
              >> >> >
              >> >> >> Thank you very much for your help!
              >> >> >> Giri
              >> >> >
              >> >> >- Prasad
              >> >> >
              >> >
              >>
              >
              >
              

  • Why TransactionManger is bound to jndi and avaiable to users???

    HI,
    Can anybody has any idea of binding the TransactionManager to jndi and allowing the user of application server to access the TransactionManager thro jndi.
    Regards
    Akhil Nagpal

    HI,
    To claryfy..I mean why TransactionManger is availble to users thro jndi. Can we enlist our XAResource to TM. what does JTA specification specifies about it.. is it manadatory for the vendor or not to provide access to TM to the user so that he/she can enlist the XAResources and control the transaction using TM.
    any insights...
    Akhil Nagpal

  • Where to find info about JNDI and Glassfish 3.1.2?

    Hello,
    i am searching already long time to find information on how to find e.g. an EntityManagerFactory using JNDI and an Glassfish server.
    Can anybody point me to some useable documentation? The GF admin and developer and deployment guide as well as the reference
    does not provide a lot of information. They write about general JNDI topics, how to configure data sources, that JNDI can be used to
    lookup resources and the like, on other places people write about, hey, lookup the EntityManagerFactory for your persistence unit
    (persistence.xml), but i am not able to find what JNDI names i can lookup and where and how i can find out what JNDI names are
    available in my server at all.
    Thanks for any hint,
    Chris

    Hello
    Maybe it sounds stupid now but what kind of info do you need exactly?
    When you need BIOS update you can visit BIOS download page - http://www.toshiba.eu/innovation/download_bios.jsp
    For drivers Toshiba drivers download page - http://www.toshiba.eu/innovation/download_drivers_bios.jsp
    When you need Users manuals document you can download it from - http://www.toshiba.eu/innovation/download_manuals.jsp
    General info about this machine you can find on http://aps2.toshiba-tro.de/unitdetails/
    Thats all you can find.
    I have old P200 and it is the same machine as your A200 just bigger with 17 display. In BIOS under advanced BIOS options there is SATA controller mode option and two options: AHCI and Compatibility mode.
    It should be used with AHCI mode and then you will have full HDD performance. Many people use compatibility mode to install old WXP without loading SATA driver.
    Can you please tell us what kind of info do you need and what do you want to do with this machine.
    I really hope we can help you somehow.

  • Rac and clustering setup

    Hi all,
    I want to know abt RAC and clustering.Can any one describe me abt these two things.
    I got two instances running in 2 AIX machines of size 25 gb each. im zero in this. can any one help me regarding this
    first of all i do no what is RAC and Clustering
    Regards
    Elamaran

    2 instances (or more) will indeed be reading and writing to the same database files. When one instance fails, the other one takes over. Therefore availability is ensured.
    look here fore info on RAC:
    http://download-uk.oracle.com/docs/cd/B19306_01/rac.102/b14197/toc.htm

  • Configuring Servers and Clusters

    Hi All,
    Whenever I am creatin HFM application,it is asking server,I have tried to "Configuring Servers and Clusters" ,but I am unable to coniger,please assist me.
    Regards,
    Prabhu

    For your second question I think it is E. Coherence Web Edition
    Because Coherence provides the ability to scale your application and also offers high availability by replicating the session objects to coherence nodes/caches.
    Thanks,
    Vijaya

  • Multiple call managers and clusters sharing one application server

    Hi
    I need to program my application such that it can be shared by multiple call managers and clusters. That is, I can only have one application server, and as a result I need to tell my application from which call manager / cluster this "request" is coming from.
    My question is how do we do that? do we have access to some parameters / variables, similar to "#DEVICENAME#", which can be used to pass the call manager identity to the application?
    TIA

    Use multiple instances of your application with different URIs (assuming the instances will not have to talk to each other), then, when configuring the service on each cluster, simply reference the specific URI of the application instance for that cluster. eg: Using Tomcat to host the PhoneMessenger application for Cluster1 and Cluster2, Deploy the same application twice: PhoneMessengerForCluster1 and PhoneMessengerForCluster2. The service URL on Cluster1 might be: http://app_server/PhoneMessengerForCluster1/servlet/PhoneMessenger , and for Cluster2 it could be http://app_server/PhoneMessengerForCluster2/servlet/PhoneMessenger

  • JNDI and JDK 1.2

    Hello everyone,
    I am trying to add entries into an LDAP using JDK 1.2 and JNDI. I have succesfully removed and listed entries(I added the entries by using JDK 1.3), but still cannot add anything to the LDAP.
    I have been using an LDAP browser to verify that the entries that I added with JDK 1.3 where indeed added. In conjuction with JDK 1.2, I have been pointing my classpath to the jndi.jar file. I have also added the providerutil.jar, and ldap.jar file to my classpath.
    Perhaps I am missing another jar file. I have download and put in my classpath, from sun's JNDI website
    (http://www.columbia.edu/~he99/jndi-ext.html) these packages ( meaning all of the jar files contained in
    these packages). I put all of them in one folder and pointed to the folder from my classpath:
    JNDI 1.2.1
    LDAP 1.2.4
    DNS 1.2
    NIS 1.2.1
    FS Context
    COS Naming 1.2.1
    I also tried using the -classpath option while compiling and running my code to explicitly and individually
    point to each jar file. I am aware that there are two different versions of the provierutil.jar file among the
    above mentioned packages. The one that is 79 KB is the only one that works, however. I have also tried
    pointing to only the individual packages from my classpath. Also, I have tried mixing and matching different
    jar files from different packages.
    I get the error message printed below this paragraph when trying to add an entry with JDK 1.2(using JNDI), but no error messages when trying to list or remove an entry. With JDK 1.3, I get none of these error messages (Im using the same exact code for both JDK 1.2 and JDK 1.3, with the exception that I add the JNDI and other necessary jar files when using JDK 1.2).
    javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - attribute not allowed]; remaining
    name 'cn=haro,ou=MDS3'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Compiled Code)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Compiled Code)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Compiled Code)
    at com.sun.jndi.ldap.LdapCtx.c_bind(Compiled Code)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(Compiled Code)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(Compiled Code)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(Compiled Code)
    at javax.naming.directory.InitialDirContext.bind(Compiled Code)
    at AddService.main(Compiled Code)
    This may have to do something with what is said here:
    http://www.columbia.edu/~he99/jndi-ext.html
    Particularly the following:
    "When a Reference is read from the naming or directory service and a codebase specifying where to load
    the factory class for the reference has been specified, JNDI will attempt to load the class from the
    locations specified in code base. In order for the class loading to succeed, you must grant the application
    the permissions appropriate for the URLs named in the codebase. For example, if the URL scheme is "http"
    or "ftp", you must grant the application the appropriate java.net.SocketPermission; if the URL scheme is
    "file", you must grant the application the appropriate java.io.FilePermission.
    If you are using JNDI as an installed extension, that is, jndi.jar has been installed in the
    $JAVA_HOME/jre/lib/ext directory, you need to take no further action."
    I have created a directory in unix and made a jre folder with lib and ext as a subfolders and then
    made the variable "$JAVA_HOME" point to that directory, in which I put all of the jar files from those
    packages (with the 79 KB providerutil jar). Still, I get the same error message.
    Does anyone know how to resolve this problem? (My development team has coded everything with JDK 1.2 so far and cannot migrate to JDK 1.3 so late in our implementation).

    ref13E,
    I think it's not because of the jdk. I use jdk1.4 and get the same exception.
    Wht is the LDAP server that you use? We use AD.
    Regards,
    George

  • JNDI / EJB deployment and clustering

    I'm aware that replication isn't supported for stateful EJBs. But the
              "serialization of the handle isn't supported" statement has me concerned.
              So I'm looking for a little clarification on this scenario:
              Let's say I've got a stateful session bean, which is accessed from a
              servlet. For performance reasons, you want to find the colocated instance -
              the smart stub should do this, right? To have it colocated in all
              instances, then I need to deploy it into each server of the cluster. This
              essentially bind()/rebind()'s (whichever call the container does during a
              deploy operation) the EJB n times. Does each of those JNDI bind/rebind
              calls "overwrite" the previous one, or does the replicated JNDI tree somehow
              "keep" all the entries?
              What happens if I bind/rebind "non-cluster enabled" objects into the JNDI
              tree in each server to the same name (like a reference data table - doesn't
              really need to be an RMI object, one per server is fine)? Will they get
              "overwritten"? Should I need to take into account the server name when
              binding into the tree, and then also use that for subsequent lookups?
              Thanks for any input!
              --Jason
              

    Guys,
    Thanks for the information.
    The problem was that classpath, some other packages required for the Bean
    were not in the weblogic\classes directory.
    so that was it.
    Thanks
    /selvan
    Murali Krishna Devarakonda wrote in message
    <7qjkr1$7dl$[email protected]>...
    Are you using the HOT DEPLOY feature(startweblogic.bat does it)?
    Then you could go to the WebLogic Console, select the Bean, and Redploy.
    You could also do it from a command line utility "weblogic.deploy".
    If you didn't start the server with the hot deploy, you need to restartyour
    server after any changes.
    You should read the weblogic docs on the Hot Deploy feature. A different
    classloader is used for it. Also, the standard weblogic classpath cannot
    coexist with it.
    Hot Deploy uses: (assuming your weblogic installation is in D:/WebLogic
    D:\WebLogic\classes/boot
    It will throw an exception if you have D:\weblogic\classes or
    D:\WebLogic\lib\weblogicaux.jar in the system classpath. You need to use
    the weblogic.classpath instead.
    Regards,
    Murali Krishna Devarakonda
    Tamilselvan Ramasamy <[email protected]> wrote in message
    news:7qi0ln$kpc$[email protected]..
    Hello,
    I have created bunch of EJB Components and deployed for WLS4.0 using the
    following way. It works fine under WLS4.0
    To compile java code -> javac *.java
    Create SER file -> java weblogic.ejb.utils.DDCreator -d .
    DeploymentDescriptor.txt
    Create JAR file -> jar cmf manifest Bean.jar /directory
    EJBC and deployment -> java weblogic.ejbc -d /targetDirectory Bean.jar
    and also add an entry in the welogic.properties file
    weblogic.ejb.deploy= ...
    When I do the samething in the WLS4.5, it doesn't work, first of all,
    JNDI
    is not finding the home interface. It throws a naming Exception
    please give me an idea hw do I deploy my Beans in the WLS4.5 using the
    command line option. I don't have Visual Cafe to do that automatically.So
    I
    have to do that manually.
    Thanks
    /selvan
    Captura Software Inc
    [email protected]

  • JNDI and env. vars. in ejb-jar.xml

    I have been trying for several days now to have my EJB session bean access
    its env. vars. stored in the ejb-jar.xml document. I have been unsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-value
    >
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried several
    things without success.
    I would appreciate any help I can get...especially if it contains specific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

    Thanks for the reference. I was using another book as a reference (Using
    Java 2 Enterprise Edition by Mark Wutka) which had the same sort of example
    and as you can see below, I coded my bean as they suggest...I'm still unable
    to access the env. vars.!
    I deployed by bean using WebLogic's Builder and but didn't create any sort
    of application. I let WebLogic do what it would on its own. The WebLogic
    documentation seemed to indicate for simple testing this would work
    fine...is it wrong?
    btw. MICRworks.MICR_ENV_TRUNCORP equates to "TruncateCorporate" as you
    probably guessed.
    The WebLogic Admin Console shows the environment variables in the EJB
    Descriptors for my EJB but they do not show up when I view the JNDI tree for
    my server. I have taken this to mean that the deployment tool is not
    binding my env. vars. for some reason which would explain why my bean can't
    find them.
    I know it must be something stupid I am doing (or not doing) but I just
    can't see it. Please help!
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello Marek,
    I would suggest that you download the free book "Mastering EJB 2ndEdition" by
    Ed Roman, Scott Ambler, and Tyler Jewell. The source code for the book isalso
    freely available and is meant to be deployed specifically on WebLogic.Look for
    a sample application called "Jasmine", which shows how to use environmententries.
    You will see a concrete example of how they are defined and later accessedfrom
    within EJBs. The book and source code are available at the followingaddress:
    >
    http://www.theserverside.com/books/masteringEJB/index.jsp
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Marek Kossak" <[email protected]> wrote:
    I have been trying for several days now to have my EJB session bean
    access
    its env. vars. stored in the ejb-jar.xml document. I have beenunsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable
    to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my
    ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-valu
    e
    >>>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried
    several
    things without success.
    I would appreciate any help I can get...especially if it containsspecific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

  • JNDI when clustering

     

    Hi Don ,
              All the manager servers in a cluster send heartbeat messages to each other
              using multicast adress) after a certain time period ( i.e every 10 sec ) ,
              at that time it updates their local JNDI tree .
              When we do clustering and a new object object get bound to a cluster then
              that object's JNDI will be replicated to all the server's in the cluster .
              Thanks and regards
              Johnny
              "Don Ferguson" <[email protected]> wrote in message
              news:[email protected]...
              > We are using ip-multicast to propogate the JNDI information to other
              > servers in the cluster. I believe the update is sent immediately
              > (rather than batched and refreshed periodically) but I'm not sure what
              > the propogation delay.
              >
              > matt wrote:
              > >
              > > Selvan,
              > > My understanding is that by default all objects registered to JNDI will
              be
              > > clustered unless you specify a "do not cluster" property in the
              > > properties file. The exact property can be found in the API doc for
              JNDI.
              > > Sunil
              > >
              > > Selvan Ramasamy <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Hello,
              > > >
              > > > If I do cluster few servers then what about the objects I bind them in
              the
              > > > JNDI.
              > > > how frequently these JNDI get reflected to all the cluster servers.
              > > > I am going to do some caching for my clients by binding some java
              > > classes
              > > > in the JNDI.
              > > >
              > > > I think that I am not clear about JNDI bindings with cluster.
              > > >
              > > > Please help me out what exactly happens when do clustering and a new
              > > object
              > > > get bound in the JNDI.
              > > >
              > > > Thanks
              > > > /selvan
              > > >
              > > > Selvan Ramasamy
              > > > Captura Software Inc
              > > >
              > > >
              > > >
              

  • T3 protocol and clusters

    Hi,
              I'm porting a Java application running against WLS6.0 to use a clustered
              server solution. This means I connect via t3 protocol. Any views on the best
              way to get failover and loadbalancing from this approach, for example is
              there anyway I can get the weblogic proxy functionality of
              HttpClusterServlet without using http protocol?
              Thanks
              Sioux
              

    Your web.xml looks OK to me.
              All you need to do is, create a .war file and copy it into applications
              directory of proxy server.
              Then register this webapp as default webapp. So whenever you hit proxy server ,
              those requests
              will be handled by this default webapp, in turn the requests will be routed to
              one of the clustered servers.
              Hope it helps
              Kumar
              Sioux France wrote:
              > Hi,
              > I understand this solution, can I ask about the possibility of using a
              > proxy?
              > Is it possible if my URL is t3://localhost:7001 and I now want to use a
              > proxy on this server to redirect to the cluster to use HttpClusterServlet
              > rather than a DNS based solution? If so what do I call to get the proxy to
              > redirect me to the cluster?
              > I've set up a servlet for HttpClusterServlet with my cluster members in the
              > parameters. How can I test from a browser that this is proxying correctly?
              > For the t3 protocol is it possible to get redirection to the cluster members
              > using HttpClusterServlet from a command line client, or is this route only
              > available for web-based queries as that is the only way the
              > HttpClusterServlet can intercept the call? i.e. Must I use my own failover
              > implementation in a DNS-based solution as discussed below?
              >
              > Here's the web.xml for my HttpClusterServlet which I've set as my default
              > webserver on the admin server. Any help understanding this appreciated!
              > Sioux
              >
              > <web-app>
              > <servlet>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <servlet-class>
              > weblogic.servlet.internal.HttpClusterServlet
              > </servlet-class>
              >
              > <init-param>
              > <param-name>defaultServers</param-name>
              > <param-value>
              > managedserver1:7003:7004|managedserver2:7003:7004
              > </param-value>
              > </init-param>
              >
              > <init-param>
              > <param-name>DebugConfigInfo</param-name>
              > <param-value>ON</param-value>
              > </init-param>
              >
              > </servlet>
              > <servlet-mapping>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <url-pattern>/</url-pattern>
              > </servlet-mapping>
              >
              > <!-- This bit is just to show it's deployed, and sure enough, it can't find
              > index.html when I call http://localhost:7001 now -->
              > <servlet-mapping>
              > <servlet-name>HttpClusterServlet</servlet-name>
              > <url-pattern>*.html</url-pattern>
              > </servlet-mapping>
              >
              > </web-app>
              >
              > "Robert Patrick" <[email protected]> wrote in message
              > news:[email protected]...
              > > The connection to the cluster is done via the JNDI lookup. The
              > PROVIDER_URL
              > > should be the "cluster name" which is either a DNS name that is mapped to
              > the
              > > list of IP addresses of the clustered servers or a hardware load-balancer.
              > Once
              > > that connection has been made, you will be looking up EJB Home objects --
              > the
              > > objects downloaded to your client are "smart stubs" that understand
              > clustering.
              > > Multiple invocations on that EJBHome reference will be load-balanced
              > across the
              > > cluster of available servers (meaning that it will handle fail-over).
              > This is
              > > easy to do since the EJBHome object is always stateless. If you use
              > stateless
              > > session beans, you can get the same behavior at the bean instance level.
              > > Stateful session beans can be replicated in-memory across a pair of server
              > > instances (much like the HttpSession replication).
              > >
              > > I suggest that you read our clustering documentation at
              > > http://e-docs.bea.com/wls/docs60/
              > >
              > > Hope this helps,
              > > Robert
              > >
              > > Sioux France wrote:
              > >
              > > > I think my point is missed, I have a lovely running cluster, with
              > clustered
              > > > EJBs, clustered JMS and now I want to call it via the t3 protocol or
              > > > something similar from a Java Application. As I understand this, it
              > means I
              > > > can't use HTTP or a proxy. I order to utilise the failover/loadbalancing
              > of
              > > > the cluster that exists, how should I connect to it from the client, can
              > I
              > > > use DNS, RMI, is there any documentation for running a cluster with Java
              > > > Application clients rather than a web front end?
              > > >
              > > > "Robert Patrick" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > > Use clustered EJBs.
              > > > >
              > > > > Sioux France wrote:
              > > > >
              > > > > > Hi,
              > > > > > I'm porting a Java application running against WLS6.0 to use a
              > clustered
              > > > > > server solution. This means I connect via t3 protocol. Any views on
              > the
              > > > best
              > > > > > way to get failover and loadbalancing from this approach, for
              > example is
              > > > > > there anyway I can get the weblogic proxy functionality of
              > > > > > HttpClusterServlet without using http protocol?
              > > > > > Thanks
              > > > > > Sioux
              > > > >
              > >
              

Maybe you are looking for