Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Q about MethodElement.getEnterpriseBean()
Q about MethodElement.getEnterpriseBean() [message #204085] Fri, 09 November 2007 16:54
Paul Reiners is currently offline Paul ReinersFriend
Messages: 19
Registered: July 2009
Junior Member
I have some code like this that is failing:

EnterpriseBean bean = method.getEnterpriseBean();
if (bean != null) {
String beanName = bean.getName();
if (beanName != null) {
System.out.println(beanName);
}
}

When I run it, bean is not null, but its name and most of its other
parts are null.

method is an instance of MethodElement, and its values, such as name,
seem be to be set correctly. It just fails in finding the
enterpriseBean with a short href like this:

<enterpriseBean
xmi:type="com.ibm.etools.ejb:ContainerManagedEntity"
href="META-INF/ejb-jar.xml#AccountEJB"/>

It does return a non-null value; it's just that the fields of that
non-null value are mostly null.

When I manually update the XMI file to contain 'long' hrefs:

<enterpriseBean
xmi:type="com.ibm.etools.ejb:ContainerManagedEntity"
href=" platform:/resource/cmpaSampleEJB/ejbModule/META-INF/ejb-jar. xml#AccountEJB "/>

the properties of bean have correct non-null values and the code works.

This code worked with the short hrefs in previous versions of
Eclipse/WebSphere, it's only failing now.

Is there a way to get this code to work without updating the values of
the href fields in the ibm-ejb-jar-ext-wbi.xmi file?
Previous Topic:StructuredTextEditor consumes huge amount of memory
Next Topic:All in one
Goto Forum:
  


Current Time: Fri Apr 26 11:24:56 GMT 2024

Powered by FUDForum. Page generated in 0.03487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top