Tim Holloway wrote:Your terminology is a little fuzzy there. But in JPA (not just Hibernate), a Generator is a mechanism for automatically assigning a primary key value when persisting a new object. Once persisted, that key's property value is accessible just like any other Entity property. Generators come in several varieties depending on where they look to determine what the next assignable key value is.
Some DBMS's have their own internal sequence generators also. So when defining a JPA Entity key that way, you should use Generator type SEQUENCE.
|initialSize||0||The initial number of connections that are created when the pool is started.|
|maxTotal||8||The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.|
|maxIdle||8||The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.|
|minIdle||0||The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.|
|maxWaitMillis||indefinitely||The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely.|
Stephan van Hulst wrote:I don't think that Gender would be so complex to warrant an embeddable type. Just use an enum for Gender and you can annotate the gender field with @Enumerated in your Person entity.
Tim Holloway]If you have set up Tomcat in its default configuration and you deploy a WAR to TOMCAT_HOME/webapps, then Tomcat will automatically deploy that WAR, and as part of the default deployment mechanism, if your WAR is in fact a WAR file, it will "explode" (unzip) that WAR file and use the exploded resources to service requests for that webapp.
Does all the wep servers explode the war file to know all the configuration stuff to execute the application ?. (IBM, WebSphere)
1. If you have set up Tomcat in its default configuration and you deploy a WAR to TOMCAT_HOME/webapps, then Tomcat will automatically deploy that WAR, and as part of the default deployment mechanism, if your WAR is in fact a WAR file, it will "explode" (unzip) that WAR file and use the exploded resources to service requests for that webapp.
2. But let's ignore the WAR file right now and look at the exploded WAR. Can you replace application files in-place in Tomcat while a webapp is running? Absolutely! Tomcat periodically (every few seconds) will scan each deployed webapp, and if it detects changes, it will re-reploy that app using the new files.
I agree but this happens with own intention of Business to make this change. Yes, It was a hypothetical to me as well. '
3. A well-run shop should have some sort of process for managing production app updates. For non-critical updates, that would generally mean scheduling a fixed downtime window. For critical updates, restarting Tomcat doesn't take long if you must, although I'd hope that some senior people would have to approve it.
I'm still a growing developer who starves for knowledge so I'm trying to understand the role of clusters in Webapp world from now on. Thanks for that.
4. And for zero-downtime shops, you're probably best off running Tomcat clusters and cycling the updates into each cluster member one by one.