Troubleshooting

Entity Bean Names

I’m confused about how to refer to an entity bean within a query.

EJB QL does not care about the name of your bean implementation classes or the home and component interfaces. When you’re defining a finder or select method for an entity, you refer to that bean using its abstract-schema-name as specified in the deployment descriptor.

Empty Strings and null

My conditional expression that checks for a null string is returning true for empty strings.

EJB QL considers an empty string to be non-null. However, you’re at the mercy of how your data store interprets empty strings when your queries are executed. Remember that your EJB QL queries are converted in the target language of the data store when your beans are ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.