Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Q about MethodElement.getEnterpriseBean()
Q about MethodElement.getEnterpriseBean() [message #204085] Fri, 09 November 2007 11:54
Eclipse UserFriend
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: Sun Jul 13 23:23:25 EDT 2025

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

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

Back to the top