Nilabhra Banerjee

Ranch Hand
+ Follow
since Mar 17, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nilabhra Banerjee

Thanks Bill for your help. I appreciate it greatly.

Continuing to think... loudly

Therefore, to get similar effect of commit and rollback of java:comp/UserTransaction, in Spring I can use PlatformTransactionManager.commit(TransactionStatus) or rollback(Tstatus) on top of JdbcTemplate. JDBCTemplate will release the connection from PlatformTransaction and close it (or reuse it ? Can it reuse it ?).

8 years ago
I am new to swing. I have a basic question. My bean definition xml is as below. I am using a jndi connection pool.
Is jdbctemplate by default, closing my connection ? Or I have to explicitly call jdbcTemplate.getDataSource().getConnection().close() every time I use jdbTemplate?


8 years ago
Please consider this as a naive/stupid question from a Greenhorn.

I have a Axis2 client (implented in java) and I am connecting to a server which is most probably an IIS server.


a) What happens if I receive a ConnectionTimed as SocketException ? Can I consider we are not able to contact the server because it is down !
b) What happens if I receive a Connection Reset as SocketException? Can I consider that server is up and we perhaps had a network interruption or other Server problems? What may be the other server problems.

9 years ago
I have got the solution from IBM WebSphere Forum.

Thanks to RoyCCC for providing the solution.

Apart from all these I have to also create an asynchronous been for TImer Manager with required thread count.
11 years ago
RAD 7.0 with WebSphere 6.0 server environment
11 years ago
Nope..still groping for an answer.

I have made a simplest test.

TestServlet (load on startup 1)

public void init() throws ServletException {
// TODO Auto-generated method stub
super.init();

System.out.println("Helllo............");
try {
InitialContext ctx = new InitialContext();
TimerManager mgr = (TimerManager)ctx.lookup("java:comp/env/timer/mytimer");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


}

web.xml

<resource-ref id="ResourceRef_1285669031941">
<res-ref-name>timer/mytimer</res-ref-name>
<res-type>commonj.timers.TimerManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

ibm-web-bnd.xmi

<resRefBindings xmi:id="ResourceRefBinding_1285669031941" jndiName="timer/mytimer">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_1285669031941"/>
</resRefBindings>


as you can see, everything I did this time is with help RAD, from adding a servlet to adding reference, I created it through IDE. no handwritten part this except those few lines in init method of the servlet.

RAD also checked that commonj.timers.TimerManager is not a broken link.(give a wrong path, and it will complain)

But still I am getting this Exception


[9/28/10 17:29:38:063 IST] 00000013 Helpers W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/timer/mytimer" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.util.ResRefJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: ResRefJndiLookupInfo
Content: com.ibm.ws.util.ResRefJndiLookupInfo@608799d1 ResRefJndiLookupInfo: Look up Name="timer/mytimer";JndiLookupInfo: jndiName="timer/mytimer"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.NameNotFoundException: Context: CSCINDAF405024Node02Cell/nodes/CSCINDAF405024Node02/servers/server1, name: timer/mytimer: First component in name timer/mytimer not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2252)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1448)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4396)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5012)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2205)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4043)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1746)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1707)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1412)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:372)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:221)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:149)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:138)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:314)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:894)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:191)
at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:403)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1280)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:201)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:142)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at com.nil.TestServlet.init(TestServlet.java:48)

11 years ago
"But after the port is opened also in the servers tab the server is still under starting state for very long time( 1 day MAX). "

Typical example of lack of memory
11 years ago
Just musing over my old thread. Yes it can be done. I did it...I kept the windowname in a cookie. The cookie can be expired and recreated every 2 seconds. THe new window opened by the user can then close this window and put focus one the old one.
IF the nodes are configured beforehand you can see the nodes in the dropdown listbox. You can add multiple members to a cluster selecting the same name node.
11 years ago
You need at atleast 3 GB to be comfortably running Websphere Test server under RAD.

Find the firsteps.bat to run the default server or the profile. Increase heap size to a comfortable level min 512 max 1024.

Then start the RAD and add the server to it.

What kind of application do you have? Why cant you add the project on server instead of using the option of running on server?
11 years ago
I want to elaborate a bit.

I am running this code (jndi lookup) from a singleton class which in turn is instantiated and run from "StartupServlet"

StartupServlet -> StartupManager (singleton) -> lookup (TimerManager)

And I did add the required entries in web.xml. (given above in my first post). And all in ibm-web-bnd.xmi and ibm-web-ext.xmi

So what wrong did I do?

11 years ago
I have the commonj source package in both WebProject war and source project jar
11 years ago
Its not in server ! It's TimerManager class I need to call through jndi reference. I checked with all IBM/BEA guidelines, none says anything about the server settings.

One such guideline document is as below

http://xml.coverpages.org/IBM-BEA-TimerV10.doc
11 years ago
Hello I have project srtucture like this

MAIN_EAR
--WEBPROJECT WAR
--- SOURCE JAR

(In s"SOURCE" I had a program where I was calling all webservice proxies defined in "WEBPROJECT" web.xml. But the day I wrote a thread there and tried to call these from the thread, it all stopped with a very clear message. Obviously I tried to use commonj.timers.TimerManager, resolve this problem. Unfortunaltey I am getting stuck in exceptions)

a) Code Snippet which threw the exception

InitialContext icReloadAll = new InitialContext();
TimerManager reloadAllTmMgr = (TimerManager)icReloadAll.lookup("java:comp/env/timer/ReloadAllCachesTimer");

b) The exception

W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/timer/ReloadAllCachesTimer" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.util.ResRefJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: ResRefJndiLookupInfo
Content: com.ibm.ws.util.ResRefJndiLookupInfo@6997a762 ResRefJndiLookupInfo: Look up Name="timer/ReloadAllCachesTimer";JndiLookupInfo: jndiName="timer/ReloadAllCachesTimer"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.NameNotFoundException: Context: INDOFF405024Node02Cell/nodes/INDOFF405024Node02/servers/server1, name: timer/ReloadAllCachesTimer: First component in name timer/ReloadAllCachesTimer not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

c) Relevant web.xml snippet

<resource-ref id="ResourceRef_11111111112">
<res-ref-name>timer/ReloadAllCachesTimer</res-ref-name>
<res-type>commonj.timers.TimerManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

d) Relevant ibm-web-bnd.xmi snippet

<resRefBindings xmi:id="ResourceRefBinding_11111111112"
jndiName="timer/ReloadAllCachesTimer">
<bindingResourceRef
href="WEB-INF/web.xml#ResourceRef_11111111112" />
</resRefBindings>

e) Relevant ibm-web-ext.xmi snippet

<resourceRefExtensions xmi:id="ResourceRefBinding_11111111112">
<resourceRef href="WEB-INF/web.xml#ResourceRef_11111111112"/>
</resourceRefExtensions>

(I didnt write on ibm-web-ext.xmi at the first go. But as I was trying all avenues, I added this part later too, but without luck though)



I must be doing something very stupid, or mistypes something? Please help !!
11 years ago
My application environment is WebSphere 6.1 in AIX

I would like to know the correlation between threads running in WebSphere and OS threads.

Why I ask this question is because I am facing a queer problem of JVM crashing, and "java.lang.OutOfMemoryError: Failed to fork OS thread" in java core dump text file with high CPU usage while performing load test.

Also out of 300 threads that are reported in javacore, at least 55% are in blocked and only 30% in runnable.

My RAM is 16GB and swap space is 4GB and two Wesbphere node running with 2GB heap each. When testing with Websphere 6.1 the nodes are 6.1 nodes, and when testing with 5.1, the nodes are 5.1 nodes. The websphere 5.1 nodes run with ease, but Websphere 6.1 gives coredump. At the point of coredump the number of threads are 150 in each nodes.

My question is : ps -ef gives only the jvm processes, then what is the impact on OS, directly or directly if there are many threads within JVM.

Thanks and Regards
N.
13 years ago