• Post Reply Bookmark Topic Watch Topic
  • New Topic

Would like to use XML bean within a Session Bean, but it may not be poss.,pls verify

 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am designing a system that uses EJBs and want to know if it is feasible
to use the Apache XMLBean technology within a Session Bean.

I have noticed that there is some threading/synchronization being done in the implemented XMLBean classes and the EJB 2.0 Spec says:

"The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt
to start, stop, suspend, or resume a thread; or to change a thread´┐Żs priority or name. The enterprise
bean must not attempt to manage thread groups."

Some of the implemented code looks like this:

public java.util.Calendar getHolidayArray(int i)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(HOLIDAY$0, i);
if (target == null)
{
throw new IndexOutOfBoundsException();
}
return target.getCalendarValue();
}
}


The idea of a schema and verification with parsing is very useful to what
I need to do. If XMLBEans are not the way to go with Session Beans,
can you recommend another API to use for this parsing and verification with a schema.

Thank you,

Ken
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!