Lookup on multiple ejb instances accross servers using servicelocator

Hi all,
i have a weird problem. I have to hit multiple ejbs hosted in diffrent server.
The problem is with the lookup and accessing..
some server's components have username and passwords and other server donot have.
So though i create a new Initial context instance with diffrent parameters.. it
is getting messed up inside. ie it is passing server A username and password to
server B's method call as for B i donot set username and password there is no
need of username and password.
the service locator will server for only one server's objects lookup. but here
we have multiple components in diffrent so different provider_URL INITIAL_CONTEXT_FACTORY,
SECURITY_PRINCIPAL, SECURITY_CREDENTIALS
and the for each i have a seperate sericelocator.. like each one for componet
A, B, C etc. in diffrent servers
and they inturn have InitialContext instance of their own. .. and these are initilized
with the factory, url, username and credentials...
this can be set as the system property also using -D option. thatz why .. when
i create for one component.... the already created Initial context factory is
getting affected with the new values. ;(((
one solution is every time create the Initial context... do not hold the reference
of contexts and donot hold reference of home handles..
but i need to cache atleast the home handles, if i am not caching.. the performance
is really bad.
on the cached handle if i call method i get a java.rmi.AccessException: Security
violation: insufficient permission to access method, though it worked for first
time,
and on the servers it which does not need passwords, method call is throwing java.lang.SecurityException:
Authentication for user ServerAUser denied in realm wl_realm
but the serverAUser belongs to server A, i get this error when i call a componets
method on Server B.
Is this a bug, or the Initial Context working it self is this way, the behind
the scence provider class is messing up. bea guys please reply if u know to solve
this problem, it will be of real help.
reagrds,
Arun.N

Problem resolved as this is an stateless session bean issues.

Similar Messages

  • JNDI Lookup for multiple server instances with multiple cluster nodes

    Hi Experts,
    I need help with retreiving log files for multiple server instances with multiple cluster nodes. The system is Netweaver 7.01.
    There are 3 server instances all instances with 3 cluster nodes.
    There are EJB session beans deployed on them to retreive the log information for each server node.
    In the session bean there is a method:
    public List getServers() {
      List servers = new ArrayList();
      ClassLoader saveLoader = Thread.currentThread().getContextClassLoader();
      try {
       Properties prop = new Properties();
       prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
       prop.put(Context.SECURITY_AUTHENTICATION, "none");
       Thread.currentThread().setContextClassLoader((com.sap.engine.services.adminadapter.interfaces.RemoteAdminInterface.class).getClassLoader());
       InitialContext mInitialContext = new InitialContext(prop);
       RemoteAdminInterface rai = (RemoteAdminInterface) mInitialContext.lookup("adminadapter");
       ClusterAdministrator cadm = rai.getClusterAdministrator();
       ConvenienceEngineAdministrator cea = rai.getConvenienceEngineAdministrator();
       int nodeId[] = cea.getClusterNodeIds();
       int dispatcherId = 0;
       String dispatcherIP = null;
       String p4Port = null;
       for (int i = 0; i < nodeId.length; i++) {
        if (cea.getClusterNodeType(nodeId[i]) != 1)
         continue;
        Properties dispatcherProp = cadm.getNodeInfo(nodeId[i]);
        dispatcherIP = dispatcherProp.getProperty("Host", "localhost");
        p4Port = cea.getServiceProperty(nodeId[i], "p4", "port");
        String[] loc = new String[3];
        loc[0] = dispatcherIP;
        loc[1] = p4Port;
        loc[2] = null;
        servers.add(loc);
       mInitialContext.close();
      } catch (NamingException e) {
      } catch (RemoteException e) {
      } finally {
       Thread.currentThread().setContextClassLoader(saveLoader);
      return servers;
    and the retreived server information used here in another class:
    public void run() {
      ReadLogsSession readLogsSession;
      int total = servers.size();
      for (Iterator iter = servers.iterator(); iter.hasNext();) {
       if (keepAlive) {
        try {
         Thread.sleep(500);
        } catch (InterruptedException e) {
         status = status + e.getMessage();
         System.err.println("LogReader Thread Exception" + e.toString());
         e.printStackTrace();
        String[] serverLocs = (String[]) iter.next();
        searchFilter.setDetails("[" + serverLocs[1] + "]");
        Properties prop = new Properties();
        prop.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
        prop.put(Context.PROVIDER_URL, serverLocs[0] + ":" + serverLocs[1]);
        System.err.println("LogReader run [" + serverLocs[0] + ":" + serverLocs[1] + "]");
        status = " Reading :[" + serverLocs[0] + ":" + serverLocs[1] + "] servers :[" + currentIndex + "/" + total + " ] ";
        prop.put("force_remote", "true");
        prop.put(Context.SECURITY_AUTHENTICATION, "none");
        try {
         Context ctx = new InitialContext(prop);
         Object ob = ctx.lookup("com.xom.sia.ReadLogsSession");
         ReadLogsSessionHome readLogsSessionHome = (ReadLogsSessionHome) PortableRemoteObject.narrow(ob, ReadLogsSessionHome.class);
         status = status + "Found ReadLogsSessionHome ["+readLogsSessionHome+"]";
         readLogsSession = readLogsSessionHome.create();
         if(readLogsSession!=null){
          status = status + " Created  ["+readLogsSession+"]";
          List l = readLogsSession.getAuditLogs(searchFilter);
          serverLocs[2] = String.valueOf(l.size());
          status = status + serverLocs[2];
          allRecords.addAll(l);
         }else{
          status = status + " unable to create  readLogsSession ";
         ctx.close();
        } catch (NamingException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (CreateException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (IOException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (Exception e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
       currentIndex++;
      jobComplete = true;
    The application is working for multiple server instances with a single cluster node but not working for multiple cusltered environment.
    Anybody knows what should be changed to handle more cluster nodes?
    Thanks,
    Gergely

    Thanks for the response.
    I was afraid that it would be something like that although
    was hoping for
    something closer to the application pools we use with IIS to
    isolate sites
    and limit the impact one badly behaving one can have on
    another.
    mmr
    "Ian Skinner" <[email protected]> wrote in message
    news:fe5u5v$pue$[email protected]..
    > Run CF with one instance. Look at your processes and see
    how much memory
    > the "JRun" process is using, multiply this by number of
    other CF
    > instances.
    >
    > You are most likely going to end up on implementing a
    "handful" of
    > instances versus "dozens" of instance on all but the
    beefiest of servers.
    >
    > This can be affected by how much memory each instance
    uses. An
    > application that puts major amounts of data into
    persistent scopes such as
    > application and|or session will have a larger foot print
    then a leaner
    > application that does not put much data into memory
    and|or leave it there
    > for a very long time.
    >
    > I know the first time we made use of CF in it's
    multi-home flavor, we went
    > a bit overboard and created way too many. After nearly
    bringing a
    > moderate server to its knees, we consolidated until we
    had three or four
    > or so IIRC. A couple dedicated to to each of our largest
    and most
    > critical applications and a couple general instances
    that ran many smaller
    > applications each.
    >
    >
    >
    >
    >

  • How to create multiple component instances at runtime using java

    Hi,
    I need to create component instances at runtime using java.I found ComponentSet.add method.But I am not finding a way to get handle of ComponentSet.
    I see methods with params of IRuntimeNode.But how to get ComponentSet from IRuntimeNode.
    If anybody knows or have sampel code then please share with me.
    thanks,
    ashok

    Ashok --
    This is a common challenge for those using Configurator Extensions with multiple instantiation for the first time. The problem is that the CIO's representation of the structure for multiply-instantiable Components differs slightly from what both Configurator Developer users and Configurator Runtime users see in those respective applications. Multiply-instantiable Components are not direct children of the Model in which they're defined. Internally, there is an entity that sits between the parent Model and the instantiable Components; that intermediate entity is the ComponentSet object you've found in the CIO documentation.
    If the name of your multiply-instantiable Component is "My Component", then its ComponentSet may be accessed simply by calling getChildByName("My Component") on its parent Model; a List of the instantiated Components may be accessed with the ComponentSet's getChildComponentNodes() method, and instances may be added and deleted using its add() and delete() methods.
    Hope this helps.
    Eogan

  • Can not find javax.ejb.CreateException when lookup and create EJB instance.

    Hi,
        I installed SAP CE 7.2 and NWDS 7.2. When i call create() of EJB's home interface from JAVA stand alone app to create EJB instance, the complier state that it need  'javax.ejb.CreateException'. How can i find the jar that contain 'javax.ejb.CreateException' to solve this problem?
    Thank a lot,
    Thongie
    Edited by: Thongie on Jul 8, 2011 7:30 PM

    Thank a lot, I can found EJB20.jar at 'usr\sap\<sid>\<instance_id>\j2ee\j2eeclient\'

  • Problem with multiple requests to different servers using HTTPService

    Hi
    I'm aware that we are limited to two concurrent connections to a single host, so I'm looking into using either subdomains pointing to the same server, or separate physical servers to process multiple requests side-by-side.
    However, whichever way I try to send three requests, looking at the Network Monitor the 3rd request always waits until one of the first two has finished. In the screenshot below, all three requests were sent at the same time to three separate physical servers, yet the top request didn't start until the bottom request finished, at 15:33:28
    Any ideas how to get round this? I'm using SSL, but I've also tested it on HTTP with the same results. I'm writing an AIR app, and posted this on the AIR forum but was told it was a Flex issue and I should post it here.
    Please let me know if any more information is needed
    Many thanks
    James

    Would that still apply even though I'm not running this inside a browser, but in AIR?
    I've seen this method recommended by other people, and also the following page seems to suggest that what I'm doing should work
    http://www.chadupton.com/blog/2008/08/maximum-concurrent-http-requests-from-adobe-air/
    Kind regards
    James

  • Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

    Hi all,
    When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
    I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
    Environment:
    The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
    Version: 3.4.1".
    i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
    The Jars i added in the classpath:
    adobe-forms-client.jar
    adobe-livecycle-client.jar
    adobe-usermanager-client.jar
    adobe-utilities.jar
    ejb.jar
    j2ee.jar
    ecutlis.jar
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    server.jar
    utlis.jar
    wsexception.jar
    My code is :
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
    ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
    //Create a FormsServiceClient object
    FormsServiceClient formsClient = new FormsServiceClient(myFactory);
    //Get Form data to pass to the processFormSubmission method
    Document formData = new Document(req.getInputStream());
    //Set run-time options
    RenderOptionsSpec processSpec = new RenderOptionsSpec();
    processSpec.setLocale("en_US");
    //Invoke the processFormSubmission method
    FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
    List fileAttachments = formOut.getAttachments();
    Iterator iter = fileAttachments.iterator();
    int i = 0 ;
    while (iter.hasNext()) {
    Document file = (Document)iter.next();
    file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
    short processState = formOut.getAction();
    ...... (To the end of the sample)
    My Error was:
    com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
    at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
    at HandleData.doPost(HandleData.java:62)
    at HandleData.doGet(HandleData.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    a

    I assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
    Do the following test:
    - Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
    - Ping machine1 from machine1 and note the ip address.
    The two pings should match.
    - Ping machine2 from machine1 and note the ip address.
    - Ping machine2 from machine2 and note the ip address.
    The two pings should match.
    Usually this kind of error would happen if your servers have internal and external ip addresses.

  • Is it possible to deploy SharePoint or its Service Applications on: multiple DB-Servers and multiple SQL Instances?

    Hello Forum,
    We have a SharePoint 2013 farm (Enterprise edition) that uses one single SQL Server 2012 (Standard edition). That statement means: All my SharePoint DBs e.g. (Config, Admin, Content, and Service Apps) DBs are hosted and running onto one single instance e.g.
    Server1\SQLInstance1.
    We have some new requirements to install and configure BI tools such as: PerformancePoint services and PowerPivot. BI tools require either SQL Server 2012 Enterprise or BI editions, and we do NOT want to upgrade our current SQL Server1\SQLInstance1
    Instead, We have other separate SQL Server instance which is enterprise edition let's name it (ServerX\InstanceX) that is running standalone, and we are thinking or using it, and my 2 questions are:
    1) Can we use this other separate
    SQL Server instance which is enterprise edition to host the create and hosts the DBs of PerformancePoint services and PowerPivot ?
    2) My second question is the same: Can I create PerformancePoint services application in my SharePoint farm, But in the Database Server field, I fill up
    the details of the other DB server ServerX\InstanceX  which is the one that is SQL
    enterprise edition ? Will this work ?
    Any official Microsoft resources/links tell that it is possible to deploy SharePoint or its service applications on multiple DB-Servers and multiple SQL Instances?

    Thank you Alex and Anil,
    What are the ramifications of that?
    I mean, Assuming that I have created such a farm where most of SarePoint DBs in Standard SQL instance while the PerformancePoint service application and others e.g. PowerPivot and reporting service are deployed and configured onto other Enterprise SQL instance.
    Are there any recommendations or concerns that you would like to draw my attention to ?

  • Multiple weblogic instances using IIS to proxy the requests

    I have a need to run multiple weblogic instances using IIS as the web
    server.
    Does anyone know if this is possible. I am aware and have been able to run
    multiple weblogic servers as an nt service,
    but in those cases weblogic was being called and IIS was being bypassed.
    Now the user base wishes to use IIS to proxy the requests.
    I have been able to set IIS to forward using the .jhtml and .jsp file
    extensions to the iisproxy.dll, but have not been able to forward these
    requests to multiple weblogic instances. When the request is made it is
    only looking in the first instance of weblogic for the request.
    Is it possible to use weblogic and IIS with two or more weblogic instances,
    without weblogic acting as a webserver.
    I dont believe this is possible but I need to find out if this really is the
    case.
    Thanks for any help you can provide.
    Ed

    You need run each IIS web server instance in its own memory space. This can
    be set through the Management Console for IIS.
    Keith
    Mike Kendzierski <[email protected]> wrote in message
    news:[email protected]..
    We tried to do this & Weblogic doesn't support this config. We opened upa
    support call with them regarding this, but there is a problem with the way
    that IIS & NT proxies .JSP pages to the weblogic servers. It's very
    unstable this way & I wouldn't recommend this config.
    We switched to Apache with virtual hosts to do this & it works fine. It's
    probably not the answer you want to hear, but it works very well.
    If you have any questions, just ask away.
    "Ed" <[email protected]> wrote in message
    news:3a296c2d$[email protected]..
    We are using IIS4 with weblogic 4.5.1 sp11,
    I thought I read someplace, their was a problem between wls 4.5.1 sp7
    and
    wls 5.1 where it didnt look in the folder where the dll was.
    I will give it a try on monday.
    Peter Mergaerts wrote in message <[email protected]>...
    We tried to do the same thing.
    We copied iisproxy.dll and iisproxy.ini to server1 and let IIS use this.dll
    instance for proxying .jsp etc.
    We copied the iisproxy.dll and iisproxy.ini to server 2, renamed
    iisproxy.dll to iisproxy2.dll (to make sure another instance was used)
    and
    let the second iis site use iisproxy2.dll, but that didn't worked. (It
    doesn't read the iisproxy.ini file located in the same directory as the.dll
    file, altough in the manual it says it checks this first.) Now, I thinkit's
    possosible to use several iisproxy.dll's as long as you rename it so
    each
    get it's own instance, the only problem is that each .dll doesn't readthe
    correct iisproxy.ini file. (BEA, is this for SP7?)
    Regards,
    Peter Mergaerts

  • How Can I Use Multiple Weblogic Instances in a Single OS

    Hello Everyone,
    Actually I have to install Some different applications. Few of them need weblogic 10.3.6 and others need 10.3.4. The OS am using is Oracle  Enterprise Linux 5.
    Now I am able to install 2 separate(One of 10.3.4 and 10.3.6) instances with two different users,In two different directories.
    I have installed the weblogic 10.3.6 version with a user webadmin and installed node manager with port 5556. This is working fine.
    The main problem here is :
    In the second instance (10.3.4 ) installed with a a different user and gave the port number to NodeManager as 1600 and its not getting started. Its throwing error and also after some errors in the terminal am able to see that its reverting to port number 5556 only.
    What might be the issue?
    I have to install 2 different versions of weblogic in a single Server. But am failing with NodeManager. What Can I do to have multiple weblogic instances with multiple versions in a single server ?
    Can anyone suggest a resolution for this please ?
    Thanks in advance.

    Pl do not spam these forums with multiple posts - How Can I Use Multiple Weblogic Instances in a Single OS

  • Running a Select query against multiple sql servers using SSIS script task.

    Hi Guys,
    I need to fetch data from multiple sql servers using  SSIS scirpt task inside a foreach container.
    is there anyway i can build dynamic sql connections using ssis variables inside SSIS script task in each loop
    Please guide me or refer any blogs so that i will try..
    Thanks in advance.

    Your only options is using .net code, then it will be no different than using a console app in a loop.
    using (SqlConnection connection = new SqlConnection(connectionString))
    connection.Open();
    Console.WriteLine("ServerVersion: {0}", connection.ServerVersion);
    Console.WriteLine("State: {0}", connection.State);
    and so forth for each connection string
    the connection string would come from the ForEach loop
    Arthur My Blog

  • Can I have multiple TFS instances use a single SSRS installation

    Can I have multiple TFS instances use a single SSRS installation?
    Thanks

    Hi Kim,
    According to your description, you have multiple TFS instances using one Reporting Services instance. Right?
    For installing TFS, to use a named instance with Team Foundation Server, you must install SQL Server by using a named instance, or move or restore Team Foundation Server data to a named instance, or create a team project collection on a named instance. Please
    refer to the link below:
    Work with SQL Server Named Instances
    Reference:
    Understanding SQL Server and SQL Server Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • WebLogic Debugging thru Multiple EjBs using VCafe 3.1

    Here is my problem:
    We are trying to use use WebLogic 4.5.1 and Visual Cafe 3.1 and debug
    with break points within multiple EjBs. However, this is not going so well.
    My first question is this, is what we are trying to do even possible with
    the versions we are using. From all I have read I gather now it is possible
    to debug using the aforementioned versions of WL and VC with special
    handling. Or is it necessary to use different versions. The problem with
    that would be that there is no Enterprise relase of Cafe past 3.1 yet.
    Further we want to use Java 1.2 and that means we have to use WL 4.5.1 (so
    4.0.3 is not an option although it works well with Debugging with VC 3.1)
    Any help or direction would really be appreciated. Thank you.

    Mark,
    Please post this in the weblogic.developer.interest.general newsgroup
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Mark Hartnett" <[email protected]> wrote in message
    news:3f57a4a3$[email protected]..
    >
    I am having a problem debugging using Eclipse 2.1 and the weblogic serverplugin
    provided by this site.
    If I start the server and run the application everything works fine.
    If I put a breakpoint into my code and then run the application I do notsee the
    application breaking at all. I am in debug view of Eclipse. The browserjust
    hangs and will not respond. I can take the breakpoint off and refresh thebrowser
    and it works fine again.
    Do I need to have anything special in a configuration file for weblogic toenable
    debugging ?
    Do I need to start the JVM with any special parms. I am currently usingthe following
    startup options. I have tried a number of configurations on the startupoptions
    and nothing works.
    -hotspon
    -ms64m
    -mx256m
    -Xdebug
    -Djava.compiler=none
    -Xnoagent
    -Dweblogic.ProductionModeEnabled=false
    I am using Weblogic 6.1 and JDK 1.3.1_09
    Thanks in advance for any help...

  • Re: WLS51 multiple server instances - no clustering, no multihoming

    Hello - This is the answer to a private question, but I'm posting it to the
    group too in hope it will help.
    Our problem was, we had one computer (Solaris) with one IP address and one
    Weblogic license, but we had two (now three) teams of developers working on
    different projects for WLS. Since they needed different settings and
    configurations, they could not use a single Weblogic server instance, so we
    had to find a way to run multiple server instances independently on a single
    machine.
    I'd call this configuration "parallel-servers" - please remember that it is
    quite different from both multihoming and clustering because all the server
    instances are independent from one another (unlike clustering) but run on
    the same IP (unlike multihoming) and different port numbers.
    This is the simplest procedure for a Solaris computer:
    1: Install WebLogic.
    Let's say the WL installation folder is:
    /wls/weblogic/
    we'll call that:
    WL_HOME/WLS_HOME/
    It contains the default server instance folder
    /wls/weblogic/myserver/
    we'll call that:
    WL_HOME/WLS_HOME/myserver/
    2: Make some copies (as many as you need)
    of the default server instance folder
    with different names, you'll have:
    WL_HOME/WLS_HOME/myserver/
    WL_HOME/WLS_HOME/server_1/
    WL_HOME/WLS_HOME/server_2/
    WL_HOME/WLS_HOME/server_n/
    3: Locate the general properties file
    /wls/weblogic/weblogic.properties
    (we'll call it: WL_HOME/WLS_HOME/weblogic.properties)
    and make a copy of it into EACH of the individual
    server instance folders; you'll end up with:
    WL_HOME/WLS_HOME/weblogic.properties
    WL_HOME/WLS_HOME/myserver/weblogic.properties
    WL_HOME/WLS_HOME/server_1/weblogic.properties
    WL_HOME/WLS_HOME/server_2/weblogic.properties
    WL_HOME/WLS_HOME/server_n/weblogic.properties
    4: In EACH server instance's properties file
    WL_HOME/WLS_HOME/server_i/weblogic.properties
    set per-server values to all the properties
    specific to the individual server; at least:
    weblogic.system.listenPort=PORT_i
    weblogic.password.system=PWD_i
    weblogic.system.SSLListenPort=SSLPORT_i
    plus everything else it should need individually,
    that is, all the things that make that single
    server instance different from all the others
    (connection pools, ACLs, EJB auto deployments and so on)
    Do NOT modify the file
    WL_HOME/WLS_HOME/myserver/weblogic.properties
    (it's a backup copy of the default settings)
    5: In the GLOBAL properties file
    WL_HOME/WLS_HOME/weblogic.properties
    cancel or comment out all the properties
    that have been individually set for all
    the individual server instances; at least:
    weblogic.system.listenPort
    weblogic.password.system
    weblogic.system.SSLListenPort
    6: Locate the default server's startup script
    /wls/weblogic/startWebLogic.sh
    (we'll call it: WL_HOME/WLS_HOME/startWebLogic.sh)
    and make a copy of it (in the same folder)
    for EACH of the new individual server instances;
    you'll end up with:
    WL_HOME/WLS_HOME/startWebLogic.sh
    WL_HOME/WLS_HOME/startServer_1.sh
    WL_HOME/WLS_HOME/startServer_2.sh
    WL_HOME/WLS_HOME/startServer_n.sh
    7: In EACH server instance's startup script
    WL_HOME/WLS_HOME/startServer_i.sh
    set values to the properties:
    weblogic.home=WL_HOME/WLS_HOME
    (where WL libraries and global files are)
    weblogic.system.home=WL_HOME/WLS_HOME
    (where the GLOBAL weblogic.properties is)
    weblogic.system.name=server_i
    (where the PER-SERVER weblogic.properties is)
    weblogic.system.listenPort=PORT_i
    weblogic.system.SSLListenPort=SSLPORT_i
    with the -D option, as in:
    $JAVA $JAVA_OPTIONS -ms64m -mx64m -classpath
    $JAVACLASSPATH -Dweblogic.class.path=$WEBLOGICCLASSPATH -Dweblogic.home=$WL_
    HOME/$WLS_HOME -Dweblogic.system.home=$WL_HOME/$WLS_HOME -Dweblogic.system.n
    ame=server_i -Djava.security.manager -Djava.security.policy=`pwd`/weblogic.
    policy -Dweblogic.system.listenPort=PORT_i -Dweblogic.system.SSLListenPort=
    SSLPORT_i weblogic.Server
    8: If you like, you might also write a shutdown script
    for each server instance (often faster than the console)
    WL_HOME/WLS_HOME/stopServer_i.sh
    which might look like:
    java -classpath $JAVACLASSPATH weblogic.Admin t3://$HOSTNAME:PORT_i SHUTDOWN
    system $PWD_i
    9: If you need individual per-server security policies,
    also duplicate and customize the default policy file
    WL_HOME/WLS_HOME/weblogic.policy
    (just like you did with weblogic.properties in steps 3 to 5)
    and specify the corresponding property in each startup script
    with the -D option
    -Djava.security.policy=`pwd`/server_i/weblogic.policy
    10: Obviously, when you deploy and use your EJBs or JSPs or applications,
    you must make sure that you specify the right individual server's parameters
    (name, user, password, port, paths and everything else).
    And that's all; obviously, there are better ways to achieve the
    "parallel-servers" configuration, but this is the simplest one and is good
    enough for a basic development environment; you might need to tune some more
    properties to suit your specific requirements.
    On a WinNT computer, the procedure should be more or less the same, the main
    difference being: instead of .sh script files, you'll have to edit .cmd
    script files.
    I am very grateful to all the people on the newsgroups who helped me work
    that out. Good luck!
    Paola R.

    "Paola R." wrote:
              > If understand that right, the way to do it is:
              >
              > - make two "clones" of the default /weblogic/myserver/ folder , say
              > /weblogic/server_1/ and /weblogic/server_2/;
              > - make a copy of file /weblogic/myserver/weblogic.properties into each new
              > folder;
              > - in the original /weblogic/myserver/weblogic.properties file, comment out
              > server-variant properties (ordinary and secure port numbers, at least) ;
              > - in each /weblogic/server_x /weblogic.properties file, set per-server
              > values to server-variant properties (ordinary and secure port numbers, at
              > least) and comment out (or leave unchanged) everything else;
              > - start each server from /weblogic/myserver/ , by specifying the path to
              > respective per-server properties in command line (or script) with
              > option -Dweblogic.home=./server_n .
              You also need weblogic.system.name=server_n and I believe it's
              weblogic.system.home rather than weblogic.home. The latter should point
              to
              your /weblogic directory.
              Hope this helps.
              Alexander Petrushko
              mailto:[email protected]
              Consulting Services available
              

  • Weblogic 10.3 POJO to EJB 3.0 call using JNDI

    Hi all,
    We are upgrading our applications from OAS to WL 10.3 and I am running into EJB lookup issues. Here is what I currently have in terms of setup.
    One EAR file being deployed and there are two main jar files in it that communicate with each other. The first jar file contains POJOs and the second is an EJB jar file. One of the classes in the POJO jar file is doing a lookup for an EJB that can be found in the EJB jar file.
    EAR file
    ---> POJO jar
    ---> EJB jar file
    The EJB itself is declared as follows
    @Stateless
    public class MyBean implements MyBeanService
    I added ejb-jar.xml and weblogic-ejb-jar.xml DDs to my ejb jar file and the bean reference shows up in the Weblogic console under the application after the deployment.
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
    <enterprise-beans>
              <session>
                   <ejb-name>MyBean</ejb-name>
                   <business-local>package.MyBeanService</business-local>
                   <ejb-class>package.MyBean</ejb-class>
                   <session-type>Stateless</session-type>
              </session>
         </enterprise-beans>
    </ejb-jar>
    weblogic-ejb-jar.xml
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90"
    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
    http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
         <weblogic-enterprise-bean>
              <ejb-name>MyBean</ejb-name>
              <jndi-name>ejb/MyBeanService</jndi-name>
         </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My POJO call to JNDI is
    InitialContext initialContext = new InitialContext();
    Object found = initialContext.lookup("ejb/MyBeanService"); //---------------------FAILS ON THE LOOKUP ON THIS LINE
    System.out.println(found.getClass());
    Error
    javax.naming.NameNotFoundException: Unable to resolve 'ejb.MyBeanService'. Resolved 'ejb'; remaining name 'MyBeanService'
    Am I not using the right lookup name? Must I prefix the call with the name of my ejb jar name?
    Thanks
    S.

    Hi,
    I made the changes as requested and it looks as follows.
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90"
    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
    http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
         <weblogic-enterprise-bean>
              <ejb-name>MyBean</ejb-name>
              <stateless-session-descriptor>
                        <business-local>package.MyBeanService</business-local>
                        <jndi-name>ejb/MyBeanService</jndi-name>
                   </business-interface-jndi-name-map>
              </stateless-session-descriptor>
         </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    I don't think <business-remote> works in <business-interface-jndi-name-map>.
    VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected element 'business-remote@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar' instead of 'business-local@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar' here in element business-interface-jndi-name-map@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar:<null> problem: cvc-complex-type.2.4a: Expected element 'business-remote@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar' instead of 'jndi-name@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar' here in element business-interface-jndi-name-map@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar:<null> problem: cvc-complex-type.2.4c: Expected element 'business-remote@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar' before the end of the content in element business-interface-jndi-name-map@http://xmlns.oracle.com/weblogic/weblogic-ejb-jar:<null>
    Anyhow if I use the <business-remote> I still get the following error when I call
    Object found = initialContext.lookup("ejb/MyBeanService"); ----> ERROR
    javax.naming.NameNotFoundException: Unable to resolve 'ejb.MyBeanService'. Resolved 'ejb'; remaining name 'MyBeanService'
    Thanking you in advance.
    S.

  • Pros and Cons of Application Isolation/Multiple server instances?

    Hi. I'm setting a new server using ColdFusion Enterprise with Apache to migrate several web application from and old server with ColdFusion 7 server. I'm currently doing research regarding multiple server instances in order to have a separate server for production apps and another for development apps (see http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363c31-7ff 5.html and https://wikidocs.adobe.com/wiki/display/coldfusionen/Using+Multiple+Server+Instanceshttp:/ /). In addition, I'm also doing research regarding application isolation to have separate production application in separate servers. I'm trying to identify all pros and cons for both "Application Isolation" and "Multiple Server Instances" to make a decision on whether I will proceed in applying these techniques. I have found several links that talk about some of the advantages but have not been able to find anything regarding possible disadvantages. Have anyone in this forum has used any of the techniques, and can provide more information/experiences regarding the pros and cons?

    Hi Ricardo_Lorenzo,
    Whether to go for Multiserver instances or Single server, is totally a user requirement based decison. If a user has Single website, or multiple websites (of the same nature, in terms of functionality), usually the part of same domain, then they would go for Single sever installation. One single instance will handle the requests from all the websites (if there are multiple). There would not be a clustering/failover setup within ColdFusion and can use the ColdFusion Standard or Enterprise version.
    On the other hand, if a user has multiple websites, all with different functionality and have multiple applications (may or may not) running, then they can go for Multiserver installation. Each website can be configured with individual instances. Clustering can be done within ColdFusion if needed. One would need an Enterprise license of ColdFusion for the same.
    Hope this helps.
    Regards,
    Anit Kumar

Maybe you are looking for

  • How can I show the bookmarks toolbar in Firefox 6 all the time?

    The bookmarks toolbar is hidden by default in Firefox 6, and "view bookmarks toolbar" will only show it until a link is clicked or the tab is changed. How can I display the bookmarks toolbar in Firefox 6 all the time?

  • Is it better to store the image in the database or to use BFile

    Hi all, I've a doubt regarding the handling of the image. For example i've the images of the persons amounting to 50,000(the number will be increased in future). So i just want to know which is the better menthod. is it better to store all the images

  • "Letting Adobe Flash communicate with the internet"

    Ok, Here is the deal. I have some .flv video files hosted on my domain with a fantastic looking flash player. It all works great. Except that every time that I change any of the code in the html snippet, or load the page with said snippet on it in iw

  • Iphone 4 Midnight Release??

    Today i spoke with someone frm my local walmart nd they said they might have a midnight release. Can anyone confirm this?? And what are the chances of this happening??

  • Log4J in a Pageflow

    I am using Log4J in a pageflow, but no log messages are getting printed on the weblogic console. Here is what I am doing - In a Pageflow I have the following code public static final String CLASS_ID = MyPageFlow.class.getName() + " - "; private stati