Hello to everybody,

I have started working with EJB about two months ago and here is a question:

I am working on an EJB 1.1 app server (JBoSS) and I have developed two entity beans: 
"Store" and "Service". For each bean I have a dependent class to model the 
availability (days open, hours for each day etc.) These are plain serializable java 
classes.

Now, since the logic for the availability of both the store and the service are the 
same, I am thinking about creating a plain (static?) java class (with no access 
modifier) that both "Store" ejb and "Service" ejb can call to get respective 
availabilities and return them to the client.

Is this a correct approach? Should I use a session/entity bean instead? Can a simple 
java class like that participate in a transaction or does it need the context?

I think it is the same as when modelling many-to-many relationships. Sun's EJB guide 
says that we should create session beans for that, but in all the examples the client 
calls entity bean methods that simply delegate to the session beans. Why not use plain 
classes?

Sorry for the long e-mail

Oikonomopoulos Spyros
SW Engineeer
Greece

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to