aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Deletion of a table mapped to an Entity Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Deletion of a table mapped to an Entity Bean" Watch "Deletion of a table mapped to an Entity Bean" New topic
Author

Deletion of a table mapped to an Entity Bean

Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
If i have a table which is mapped to an entity bean and that table gets dropped and re-created periodically , how will it affect ??? Is there any way to specify the container to expect this or for us to explicitly handle this scenario through the code
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

Hi,
I doubt whether any container will suppport. Ur code has to take care of the scenario for which u will have to use BMP. Using CMP may result in NoSuchEntityException.


Groovy
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
If it's a "read only" entity, you might be able to configure some settings within your container, telling it to refresh the cache every x minutes.
Depends on the container you're using...
Simon
Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
am using WebLogic 6.1 sp2 . This entity bean is not read-only .So I guess I will have to write it as a CMP and handle the exception programmatically ???.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deletion of a table mapped to an Entity Bean
 
Similar Threads
entity bean and multiple tables
help for understanding composite entity
EJB 2.0 Deployment problem
Composite primary key-Exception:could not resolve property
Entity Bean instances when mapped to a database table