Glassfish JAX-WS side by side SSL / insecure EJB webservice
Why you just not proxy app server with Apache HTTP server or similar? I usually do this way and leave SSL handshaking/open text connection to HTTP in front of it.
Why you just not proxy app server with Apache HTTP server or similar? I usually do this way and leave SSL handshaking/open text connection to HTTP in front of it.
I would go for Stateless – the server can generate many instances of the bean and process incoming requests in parallel. Singleton sounds like a potential bottleneck – the default @Lock value is @Lock(WRITE) but may be changed to @Lock(READ) for the bean or individual methods.
Stateful session beans (SFSB) are not exactly what you think they are. You seem to think that they behave somehow like session scoped JSF managed beans. This is untrue. The term “session” in EJBs has an entirely different meaning than the HTTP session which you’ve had in mind. The “session” in EJBs must be interpreted … Read more
For more info on JPA and database views see, http://en.wikibooks.org/wiki/Java_Persistence/Advanced_Topics#Views In JPA you can map to a VIEW the same as a table, using the @Table annotation. You can then map each column in the view to your object’s attributes. Views are normally read-only, so object’s mapping to views are normally also read-only. In most … Read more
The persistent property means that the container is required to persist the timer state to a database. This is important if you need to guarantee that the timer will fire even if the server is taken offline (intentionally or crash). When the server comes back online, it is required to execute missed timers. Setting a … Read more
This is what the EJB spec says: The choice between the local and the remote programming model is a design decision that the Bean Provider makes when developing the enterprise bean. While it is possible to provide both a remote client view and a local client view for an enterprise bean, more typically only one … Read more
Depending on whether the transaction encloses the loop, batching typically already happens in your case. JPA will collect all your updates in its L1 cache, and typically write that all to the DB in a batch when the transaction commits. This is not really that different with batching in JDBC, where every batch-item you add … Read more
First of all, there is no rollback of an exception, it’s a rollback of a transaction. If you throw your exception with @ApplicationException(rollback=true), you don’t have to rollback the transaction manually. Context.setRollbackOnly() forces the container to rollback the transaction, also if there is no exception. A checked exception itself doesn’t rollback a transaction. It needs … Read more
The EJB or Enterprise Java Beans are plain java classes (since version 3.0) with annotations that enable to you write the business logic of your applications and later deploy it (or install) on a Java Enterprise Edition Server. You must consider use EJB if you wish to take advantage of the following services provided by … Read more