Bind a huge object to jndi tree in sun one 7
Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. Kindly provide some guidance. Thanks in advance.
Hi,
Refer http://java.sun.com/products/jndi/tutorial/objects/storing/remote.html
-amol
Similar Messages
-
Unable to bind object in JNDI tree.
While I try to bind a simple object in JNDI tree I get the following error.
I have not used any cluster .
Server : Web Logic 8.1 SP 6
Jdk version 1.4.2 comes along with bea weblogic 8.1 sp 6
Javax.naming.communicationException[
Root exception is java.rmi.unmarshalException:
Error unmarshalling arguments; nested exception is :
Java.lang.ClassNotFoundException: com.examples.person : This error could indicate that a compound was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on a server that is part of a cluster is also deployed on all other member of that cluster.Is this somehow being called from the parameterless constructor?
You sometimes have to wrap bits of code with in designer checks to stop em running.
In c# that would be:
if (!DesignerProperties.GetIsInDesignMode(this))
// do your stuff only at runtime
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML -
How to bind an object to JNDI tree in iAS?
Hi all,
When I try to bind a string object to jndi tree, the following exception
occurs:
javax.naming.NamingException: Unable to get object instance from reference.
Roo
t exception is javax.naming.NamingException: Can't bind instance of class
java.lang.String
at com.netscape.server.jndi.RootContext.bindCtx(Unknown Source)
at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
at com.netscape.server.jndi.RootContext.rebind(Unknown Source)
at javax.naming.InitialContext.rebind(InitialContext.java:385)
at jsp.APPS.bmx.test2._jspService(test2.java:76)
at jsp.APPS.bmx.test2.service(test2.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
The code fragment is:
Context ctx = new InitialContext();
String str = "hell,every one!";
ctx.rebind("abc", str);
Can anyone give some help? Thanks in advance.
JohnsonTo bind an object into the JNDI tree check the documentation here:
http://e-docs.bea.com/wls/docs81/jndi/jndi.html#475702
If this is to be used by all your applications that you deploy on the server check out the startup/shutdown class documentation here:
http://edocs.bea.com/wls/docs81/ConsoleHelp/startup_shutdown.html
Cheers
IV -
Unable to register object in JNDI tree
While I try to bind a simple object in JNDI tree I get the following error.
I have not used any cluster .
Server : Web Logic 8.1 SP 6
Javax.naming.communicationException[
Root exception is java.rmi.unmarshalException:
Error unmarshalling arguments; nested exception is :
Java.lang.ClassNotFoundException: com.examples.person : This error could indicate that a compound was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on a server that is part of a cluster is also deployed on all other member of that cluster.
-------------------------------Is this somehow being called from the parameterless constructor?
You sometimes have to wrap bits of code with in designer checks to stop em running.
In c# that would be:
if (!DesignerProperties.GetIsInDesignMode(this))
// do your stuff only at runtime
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML -
Bind remote object to JNDI tree
I want to create a JNDI tree in the same JVM with remote object, and then I have two problem:
1> Should I bind remote object or its stub to the JNDI tree?
2> How to look up the JNDI tree to get the binded stub from the client side? (Suppose server ip is 192.168.99.42)
I hope a gentleman would give me a piece of code, so i would be much clearer. Thanks a lot!Hi,
Refer http://java.sun.com/products/jndi/tutorial/objects/storing/remote.html
-amol -
Jndi tree different in different servers in a cluster?
I bind a Properties object in jndi tree and it comes up fine in one node
i.e. I can see it in the jndi tree on one Server.
But I cannot see it in another Server in the cluster. Any idea why this
behaviour?
the code looks like this:
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY, JNDITags.JNDI_FACTORY);
h.put(WLContext.CREATE_INTERMEDIATE_CONTEXTS, new
Boolean(true));
if (user != null) {
h.put(Context.SECURITY_PRINCIPAL, user);
if (pwd == null)
pwd = "";
h.put(Context.SECURITY_CREDENTIALS, pwd);
InitialContext ic = new InitialContext(h);
Context ctx = ic.createSubcontext( "yy");
ctx.bind( "lp", props );
ctx.close();
ic.close();
KomalIf you are trying to do the lookup "at startup time for server 2", the JNDI
replication may not be complete yet. We had a similar problem trying to deploy
MDBs against JMS destinations on remote servers...
komal mangtani wrote:
Can't a bind an object on 1 server and do a lookup on other server ?
Like in my case, when 1st server starts, it binds the object to the jndi
tree in its startup class.
Then the second server comes up and does a lookup on the same object in its
own startup class.
Isn't the jndi tree, suppose to get replicated to another server?
Komal.
komal mangtani wrote:
I bind a Properties object in jndi tree and it comes up fine in one node
i.e. I can see it in the jndi tree on one Server.
But I cannot see it in another Server in the cluster. Any idea why this
behaviour?
the code looks like this:
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY, JNDITags.JNDI_FACTORY);
h.put(WLContext.CREATE_INTERMEDIATE_CONTEXTS, new
Boolean(true));
if (user != null) {
h.put(Context.SECURITY_PRINCIPAL, user);
if (pwd == null)
pwd = "";
h.put(Context.SECURITY_CREDENTIALS, pwd);
InitialContext ic = new InitialContext(h);
Context ctx = ic.createSubcontext( "yy");
ctx.bind( "lp", props );
ctx.close();
ic.close();
Komal -
JNDI bind/rebind and object state question
Hi,
I have an object that is part of an EAR application that is deployed into an app server. I load a Webapp that initializes an object and then binds it to an initial context under java:comp/env setting some initial state.
However, when I access the object from an MDB as part of the EAR application, the state, when retrieved from the same context, was not retained. Here is the code I am using to bind the object to the context:
if (!object.isRunning()) {
System.out.println("Starting App...");
object.start();
try {
getNamingContext().bind(object);
} catch (Exception e) {
System.out.println("Name bound already, rebinding...");
try {
getNamingContext().rebind(object);
e.printStackTrace();
} catch (Exception e1) {
e1.printStackTrace();
System.out.println("Broker started...");
}When I retrieve the object from the initial context as part of a message received within an MDB, the state is such that the object is always failing the .isRunning method test and subsequently throws an exception.
What am I doing wrong? Is this related to the fact that possibly the WAR and the MDB create duplicate contexts when I expect there to be only one?
Any insight is greatly appreciated.
Thanks,
Johnfollowing procedure works fine for now, if there is any straight forward solutions,
that will be helpful.
1) Create the Subcontexts for each of the sub entries in the jndi name tree
2) bind the object to the last entry in the tree.
i.e if the jndi tree name is "one.two.three", and the bind object is Obj
ctx = ctx.createSubcontext("one");
ctx = ctx.createSubcontext("two");
ctx = ctx.bind("three", obj);
Thanks,
Gangs.
"Gangadhar" <[email protected]> wrote:
>
Hi,
I am trying to bind the local object to the Weblogic JNDI, using the
code below.
It works fine if the bind name is a straight forward String(not a tree).
It is
throwing naming Exception when i am trying to bind into a new tree.
Thanks,
Gangs.
//GETTING THE INITIAL CONTEXT:
private Context getInitialContext() throws NamingException {
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
h.put(Context.SECURITY_PRINCIPAL, "user");
h.put(Context.SECURITY_CREDENTIALS, "password");
h.put(Context.PROVIDER_URL, url);
return new InitialContext(h);
} catch (NamingException ne) {
log("We were unable to get a connection to the WebLogic server
at "+url);
log("Please make sure that the server is running.");
throw ne;
private registerObject()
throws NamingException
// Lookup the beans home using JNDI
Context ctx = getInitialContext();
try{
//This binding works fine.
String bname = "Ganga";
ctx.bind("plainname", bname);
//This one throws an Naming Exception..
ctx.rebind("one.two.three", bname);
} catch(javax.naming.NameAlreadyBoundException nlb){
System.out.print(nlb.getMessage());
System.exit(0);
}catch(javax.naming.directory.InvalidAttributesException iae){
System.out.print(iae.getMessage());
System.exit(0);
}catch(NamingException ne){
System.out.print(ne.getMessage());
System.exit(0);
Exception msg is : Unable to resolve 'one.two.three' Resolved: '' Unresolved:'one' -
Shared JNDI Tree WL 10 and SAP Web AS
Hi,
in my current project, the vision is to have a joined JNDI tree for the platform. Currently we have a WL 10 server hosting a web application with its own JNDI tree and a SAP Web Application Server also with an JNDI tree. The server are not clustered. The vision is to merge the JNDI trees and have one central instance which can be accessed by both AS. Is this a feasable solution? What is required to setup the central/share JNDI tree and which server should host the JNDI tree? Can anyone point me to some relevant documentation?Cord Plasse <> writes:
You can't really share the tree, although you could federate from one
namespace to the other.
andy
Hi,
in my current project, the vision is to have a joined JNDI tree for the platform. Currently we have a WL 10 server hosting a web application with its own JNDI tree and a SAP Web Application Server also with an JNDI tree. The server are not clustered. The vision is to merge the JNDI trees and have one central instance which can be accessed by both AS. Is this a feasable solution? What is required to setup the central/share JNDI tree and which server should host the JNDI tree? Can anyone point me to some relevant documentation? -
Crystal Reports XI and Sun One 6.1 web server SP 5 Error finding JNDI name
I am trying to create a Crystal Reports XI report in a JSP using Sun One 6.1 Web server sp 5.
At this point I am getting the error �Error finding JNDI name� on Sun One
The application will run on Netbeans/Tomcat
I have done the following:
I edited CRConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
�
<DataDriverCommon>
<JavaDir>C:\Program Files\Java\j2re1.4.2_10\bin</JavaDir>
<Classpath>C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar;�</Classpath>
�
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>jdbc:oracle:thin:@10.10.10.10:1521:dev</JDBCURL>
<JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
<JDBCUserName>lab_ro</JDBCUserName>
<JNDIURL></JNDIURL>
�
</JDBC>
I created a report using JDBC (JNDI) connection and have the JNDI Connection set to the name of DATA.
The report works just fine in Crystal Reports.
Then in Netbeans I created an application and it runs in the Tomcat part of Netbeans
In context.xml I have:
<Context path="/BOEnterpriseTest3">
<Resource name="jdbc/dev" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev"
username="theuserid" password="thepassword" maxActive="20" maxIdle="10" maxWait="-1"/>
</Context>
In web.xml I have
<web-app>
<context-param>
<param-name>crystal_image_uri</param-name>
<param-value>crystalreportviewers11</param-value>
</context-param>
�
<taglib>
<taglib-uri>/crystal-tags-reportviewer.tld</taglib-uri>
<taglib-location>/WEB-INF/crystal-tags-reportviewer.tld</taglib-location>
</taglib>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
<res-ref-name>jdbc/dev10g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
<res-ref-name>Data</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
in web-inf\sun-web.xml I have
<sun-web-app>
<resource-ref>
<res-ref-name>jdbc/dev10g</res-ref-name>
<jndi-name>Data</jndi-name>
</resource-ref>
</sun-web-app>
I have copied all of Common Files\Business Objects\3.0\java\lib and Common Files\Business Objects\3.0\java\lib\external to the lib folder
I have copied crystalreportviewers11 to the root of my web application
I have tried to load the JNDI information and display the report
<%@page pageEncoding="UTF-8"
import="com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.report.web.viewer.*,
javax.naming.*,
javax.sql.*,
java.sql.*"%>
<%
InitialContext initContext = new InitialContext();
DataSource source = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
try{
// Look up our data source
DataSource ds = (DataSource)initCtx.lookup("Data");
out.println("found ds under jdbc/Data");
catch ( NamingException e ){
// Look up our data source
DataSource ds = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
initCtx.bind("Data", ds);
out.println("found ds under java:com/env:jdbc/Data - bound into root initial context for Crystal to find");
%>
<%
//Use the relative path to the report; the physical or full qualified URL cannot be used.
String reportName = "useridincluded.rpt";
//Database username and password
String userName = "theuserid";
String password = "thepassword";
//check to see if the Report Source Session Variable already exist
Object reportSource = session.getAttribute("Report1");
// Create a new ConnectionInfos and ConnectionInfo object
com.crystaldecisions.sdk.occa.report.data.ConnectionInfos connectionInfos = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfos();
com.crystaldecisions.sdk.occa.report.data.ConnectionInfo connectionInfo = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfo();
//Set username and password for the report's database
connectionInfo.setUserName(userName);
connectionInfo.setPassword(password);
//Add object to collection
connectionInfos.add(connectionInfo);
//---------- Create a ReportClientDocument -------------
com.crystaldecisions.reports.sdk.ReportClientDocument reportClientDocument = new com.crystaldecisions.reports.sdk.ReportClientDocument();
//---------- Set the path to the location of the report soruce -------------
//Open report.
reportClientDocument.open(reportName, 0);
//Get the report source
reportSource = reportClientDocument.getReportSource();
//---------- Create the viewer and render the report -------------
//create the CrystalReportViewer object
com.crystaldecisions.report.web.viewer.CrystalReportViewer crystalReportViewer = new com.crystaldecisions.report.web.viewer.CrystalReportViewer();
//set the reportsource property of the viewer
crystalReportViewer.setReportSource(reportSource);
//set the DB logon into the viewer
crystalReportViewer.setDatabaseLogonInfos(connectionInfos);
//set viewer attributes
crystalReportViewer.setOwnPage(true);
crystalReportViewer.setOwnForm(true);
crystalReportViewer.refresh();
//set the CrystalReportViewer print mode
//crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.ACTIVEX);
crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.PDF);
//process the report
crystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
%>
On the Sun One Web server
On the Java Tab
JDBC Connection Pools
Pool Name = dev10g
Class name = oracle.jdbc.pool.OracleDataSource
User id = theuserid
url = 10.10.10.10
password=thepassword
JDBC Resources
JNDI Name=dev10g
Pool = dev10g
I get the error finding JNDI name � how do I tell Sun One where the JNDI is to make Crystal Reports work?I tried the following to test the JNDI
I am trying to do JNDI in Sun One Web server 6.1 sp 5 but I seem to be missing an important part. I get two different errors based on the JSP code, �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance� or �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�.
Context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/BOTest">
<Resource name="jdbc/dev10g" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
<Resource name="Data" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
</Context>Sun-one.xml:
<sun-web-app>
<context-root>BOTest</context-root>
<resource-ref>
<res-ref-name>jdbc/dev10g</res-ref-name>
<jndi-name>jdbc/dev10g</jndi-name>
</resource-ref>
</sun-web-app>web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
<res-ref-name>jdbc/dev10g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
<res-ref-name>Data</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>server.xml has:
<RESOURCES>
- <JDBCCONNECTIONPOOL name="dev10g" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
<PROPERTY name="User" value="lab_ro" />
<PROPERTY name="Password" value="0asphalt1" />
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/dev10g" poolname="dev10g" enabled="on" />
<JDBCRESOURCE jndiname="Data" poolname="dev10g" enabled="on" />
- <JDBCCONNECTIONPOOL name="Data" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="User" value="lab_ro" />
<PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
<PROPERTY name="Password" value="0asphalt1" />
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/Data" poolname="Data" enabled="on" />
<JDBCRESOURCE jndiname="dev10g" poolname="dev10g" enabled="on" />
</RESOURCES>I am getting the following error: �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�
With the following code:
<%@page
import="java.io.*,
javax.sql.*,
javax.naming.*,
java.sql.*,
java.util.*"%>
<%
Context init;
Context ctx;
DataSource datasource;
Connection con;
try
init = new InitialContext();
Context envCtx = (Context) init.lookup("java:comp/env");
datasource = (DataSource) envCtx.lookup("jdbc/dev10g");
catch(NamingException ex)
out.print("Cannot retrieve data source: " + ex.toString(true));
return;
try
con = datasource.getConnection();
catch (Exception e)
out.print("Cannot retrieve connection: " + e.toString());
return;
try
PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
ResultSet results = pstmt.executeQuery();
while (results.next())
out.println(results.getString(1));
catch(Exception ex)
out.print("Got connection, can't execute query: " + ex.toString());
return;
%>I get the following error: Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance
With the following code:
<%@page
import="java.io.*,
javax.sql.*,
javax.naming.*,
java.sql.*,
java.util.*"%>
<%
Context init;
Context ctx;
DataSource datasource;
Connection con;
try
init = new InitialContext();
ctx = (Context) init.lookup("java:comp/env");
datasource = (DataSource) ctx.lookup("jdbc/dev10g");
catch(NamingException ex)
out.print("Cannot retrieve data source: " + ex.toString(true));
return;
try
con = datasource.getConnection();
catch (Exception e)
out.print("Cannot retrieve connection: " + e.toString());
return;
try
PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
ResultSet results = pstmt.executeQuery();
while (results.next())
out.println(results.getString(1));
catch(Exception ex)
out.print("Got connection, can't execute query: " + ex.toString());
return;
%> -
Creating JNDI datsource for Sybase 11.2 in Sun One Web Server 6.1
Hi,
I would like to get detailed explanation on how to create JNDI datasource in Sun One Web Server 6.1 for Sybase 11.2. Can anybody help?Did you read and follow the WebServer manual? Since you did not even provide a version number, I'll point you at the latest:
http://docs.sun.com/app/docs/coll/WebServer_05q1
Thanks,
-- Marco -
I have a working Sun One directory that has explicit groups -- groupOfUniqueName objectswith uniqueMember attributes.
I'm trying to use JNDI to do something similar to what I've done in the past on OpenLDAP. My searches are successful, but I have yet to be able to retrieve the uniqueMember attributes. It's as if they don't exist. Coincidentally (or not), a generic LDAP browser tool has the same problem.
I've perused what little I can find in the development documentation and there doesn't seem to be anything special required to do JNDI against a Sun One Directory Server.
What am I missing?You don't have to create these files. You need to import the package and make sure your environment Classpath has access to the package also. Then only you will be able to compile your code.
Let me know if you need further help -
Binding huge object to the jndi tree.
Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. This same thing is working with about 4MB object in Sun One but takes about 45 Mins to 1 Hour to finish the serialization etc for jndi .Kindly provide some guidance.Thanks in advance.
True. At the end I configured the value as a "server property". The cool thing about configuring the jndi tree is that it is replicated in a cluster.
Obviously the values that I inserted affected all the applications, like the url of our SOA server. -
Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.
I have created a simple server (BankImpl), implementing a RMI interface
called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
class using
"rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
in Weblogic
server 7 under the name of "PeopleBank".
After the binding, I can see the stub class in the JNDI tree, but with a
different name: BankImpl_WLStub.class). when a
client program is trying to lookup the stub associated with "PeopleBank", it
failed with a puzzling message:
java.io.NotSerializableException: BankImpl_WLStub
Why a stub of a RMI object is not serializable? Does Weblogic needs a
different rmic to generate RMI stubs?
Thanks,
LianI have created a simple server (BankImpl), implementing a RMI interface
called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
class using
"rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
in Weblogic
server 7 under the name of "PeopleBank".
After the binding, I can see the stub class in the JNDI tree, but with a
different name: BankImpl_WLStub.class). when a
client program is trying to lookup the stub associated with "PeopleBank", it
failed with a puzzling message:
java.io.NotSerializableException: BankImpl_WLStub
Why a stub of a RMI object is not serializable? Does Weblogic needs a
different rmic to generate RMI stubs?
Thanks,
Lian -
Binding to jndi tree takes ages
Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. This same thing is working with about 4MB object in Sun One but takes about 45 Mins to 1 Hour to finish the serialization etc for jndi .Kindly provide some guidance.Thanks in advance.
Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. This same thing is working with about 4MB object in Sun One but takes about 45 Mins to 1 Hour to finish the serialization etc for jndi .Kindly provide some guidance.Thanks in advance.
-
InitialContext ctx = new InitialContext ();
ctx.rebind ("wwlhp", remoteObject);Does the JNDI tree and remoteObject reside in the same JVM?
Can i use JNDI without J2EE platform?
Can some one give me a piece of code illustrating rebinding in server side and looking up in client side.import javax.naming.*;
import java.util.*;
public class Server{
public static void main(String[]args){
try{
Hashtable env=new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
env.put(Context.PROVIDER_URL,"rmi://servername");
Context ctx=new InitialContext(env);
//create an instance of remote object
RemoteIF i=new RemoteImpl();
ctx.rebind("common name",ri);
}catch(Exception ex){}
The client needs to create a context as well, as above, the lookup
RemoteIF ri=(RemoteIF)ctx.lookup("common name");
The Stub classes must be available to the client as well
start rmiregistry
start the server
off you go with the client
Maybe you are looking for
-
Live office database errors in Citrix - underlying WebI reports work fine
Hi, We have a live office report with 30 tabs in the excel file i.e. 30 webi report parts in it. It accesses 20 webi reports, each built on a BEX query. Please see below the error which users get while running the report in Citrix environment. The un
-
Regd : How to find Validity date for a user in central user system
Hi Experts; I want to get the list of users with profile SAP_ALL with following details like validity ,user type ,user name ,user id.. I can get through SUIM for each individual systems.Its very difficult to login to each system ,generate the report
-
Import Declaration after goods receipt - Inward Processing Help
Looking for some advice on setting up Inward Processing as I am running into issues. Our system makeup is this: ECC - 617 GTS - 10.1 One of our facilities is setup so that they have duty deferment for imported components that are used in manufacturi
-
Paging ResultSet Data from SQL Server
Hi all, I have a serious problem and am calling on all the java guru's who have experience in databases. I have a large table in SQL Server 2000 with thousands of rows. I wish to return 50 rows at a time (0 - 50, 50 - 100, etc...) I am creating a pag
-
HT4623 Where is the serial number for a refurbished iphone 4S located?
Where is the serial number for a refurbished iphone 4S located? How do i activate this phone if I am upgrading from a Blackberry?