• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Object returned by session bean vanishes at Presentation Layer !

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I have the following issue in my code. I am returning a HashMap from my session bean method and I have ensured that the HashMap is populated with values ( Log messages show that the HashMap has values in ejb layer).
The "Presentation Layer" and the "EJB Layer" are in separate machines. When i make a remote ejb call from the presentation layer, the values returned are null (the ejbs are looked up properly and the remote method is getting called and - i can see log messages in ejb server). I am not getting a RemoteException or Serialization related exception.
Have anyone faced similar situation before ?
Please throw some light in this issue as I am not able to locate the problem.
Thanks in Advance
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange. Which application server / web container you're using? From what you described, the only cause I could think of would be a typo but I'm sure you've triple-checked the code already...
I remember once having the following typo cause something similar:
 
Param
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using WebSphere Application Server V 4.0.3 as my EJB Server and WebSphere Portal Server V 4.2.1 as my other Server for Presentation Layer code.
Here is my code snippet.

//MY PRESENTATION LAYER EJB DELEGATE METHOD:
public DomainMasterCollectionBean populateDomainValueCache() throws Exception {
DomainMasterCollectionBean dmMasterCollection =null;

try {


dmMasterCollection = getCacheLoaderService().populateDomainValueCache();
//dmMasterCollection prints null here. No Remote Exception or any other exception thrown.
} catch (RemoteException e) {
throw new Exception(e);
}

return dmMasterCollection;
}
/MY PRESENTATION LAYER EJB DELEGATE METHOD:
public DomainMasterCollectionBean populateDomainValueCache() throws Exception {
// This domain maanger class has a static field (DomainMasterCollectionBean) which has preloaded values.

// DomainManager.getAllDomainValues().size() prints non-zero size.

return DomainManager.getAllDomainValues();
}
 
Param
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PLEASE SEE THIS CODE SNIPPET:
//MY PRESENTATION LAYER EJB DELEGATE METHOD:
public DomainMasterCollectionBean populateDomainValueCache() throws Exception {
DomainMasterCollectionBean dmMasterCollection =null;
try {

dmMasterCollection = getCacheLoaderService().populateDomainValueCache();
//dmMasterCollection prints null here. No Remote Exception or any other exception thrown.
} catch (RemoteException e) {
throw new Exception(e);
}
return dmMasterCollection;
}
//MY EJB METHOD:
public DomainMasterCollectionBean populateDomainValueCache() throws Exception {
// This domain maanger class has a static field (DomainMasterCollectionBean) which has preloaded values.
// DomainManager.getAllDomainValues().size() prints non-zero size.
return DomainManager.getAllDomainValues();
}
 
Param
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the problem rectified. I rewrote the method and re-deployed and the problem vanished.
 
reply
    Bookmark Topic Watch Topic
  • New Topic