Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book


General Errors

Q: Why do I get an error when I create the InitialContext?

A: You might need to tell JNDI the name of the InitalContextFactory class by setting the java.naming.factory.initial property. There might be other reasons for this error. You should consult the documentation for your EJB server to find other possible causes. For example, the Inprise Application Server might require you to run the OSAgent naming service, although WebLogic required you to supply the provider URL.

Q: Why do I get an error when I try to bind my Queue or Topic?

A: In the examples in this chapter, there is a slight chance that if the producer and consumer start at the same time, they might both try to create the queue or topic. One will bind successfully, whereas the other will get an error. You might want to add code to try locating the queue or topic again if the bind fails.

Message-Driven Beans

Q: Why doesn't my EJB server support message-driven beans?

A: EJB 2.0 is still a fairly new specification. It might take some time for all the EJB servers to support the new specification.

  • + Share This
  • 🔖 Save To Your Account