William Markito Oliveira

Author
+ Follow
since Nov 06, 2007
William likes ...
Python Java Linux
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
5
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by William Markito Oliveira

Well, this is an actual debate on multiple forums which doesn't only include DI but also dynamic languages vs static languages.

Since this would be a real long debate, I'd prefer to share some good literature about it and let you conclude by yourself what's best for the solution/system you'd be implementing.

"DIP in the Wild

The Dependency Inversion Principle (DIP) has been around since the early '90s, even so it seems easy to forget in the middle of solving a problem. After a few definitions, I'll present a number of applications of the DIP I've personally used on real projects so you'll have some examples from which to form your own conclusions."

- http://martinfowler.com/articles/dipInTheWild.html
- http://www.martinfowler.com/articles/injection.html

Cheers,
The concept behind CDI is indeed based on DI which has Spring as one of the most popular frameworks using it, but the Java EE RI implementation is actually based on JBoss Weld (http://weld.cdi-spec.org/).

HTH
Hi Naresh,

1) I don't fully understand what you mean on this item, but the node manager used by WebLogic is purely for administration purposes of a WebLogic instance. It's just a monitoring process which is not capable of any batch or any application processing at all. That said, the new Batch processing API has the benefit of being inside the platform without external dependencies or frameworks. Spring Batch for example is an alternative for Spring shops, but for purely Java shops, there is a native option.

2) It's really hard to tell as it has other considerations such as the payload size and frequency if calls. But my understanding is the same as yours and a good ideia here is to use load balancing and clustering to spread the load between multiple servers for such large systems. 10k simultaneous connections is really a lot.

3) Although I know the answer, I'd prefer to have you simply print the Thread Name on an async servlet method so you can see yourself how exactly it works. But to give you a hint, most application servers has thread pools internally in order to handle thread creation to be more efficient and restrict impact on other apps or admin tasks.

4) There are multiple ways to implement JPA caching. But in general, depending on the size of the system, you may want to store results on external JVM nodes, leveraging that as a mechanism to distribute the data. For example: Let's say you are inside the app server (web app) and make a JPA request which will check the cache first and then hit the DB, which during response will populate the cache. Using some solutions like Pivotal GemFire or Oracle Coherence for this caching, it can distribute this among multiple nodes and on 2nd request for the web app running on a diff node than than the 1st request, the system will already have that data in memory and doesn't require another DB query. The fact that this data it's on a diff JVM process indeed has some cost, but it's still cheaper than a network hop to the database + query processing time there. What we do recommend is to have diff JVM for this cache but to keep them co-located in the same host and to avoid out of memory errors on the app server JVM, which in this case will not host JPA cache data, only web application objects.

Hope that helps.

PS: Thanks for the suggestion.
Hi Paulo,

You can monitor a Job status through a JobListener, please check the following page and look for "The Listener Batch Artifacts" section.
http://docs.oracle.com/javaee/7/tutorial/doc/batch-processing008.htm#BCGJHEHJ
API: http://docs.oracle.com/javaee/7/api/javax/batch/api/listener/JobListener.html

On the afterJob method you can post the JMS message or whatever needed.

Cheers
Well, let me try to address both questions with a few thoughts you might consider:

The Realm concept that most application servers (Glassfish, WebLogic, JBoss, WebSphere....) implements are backed by the security specification of Java EE, which "defines" the minimal requirements and unfortunately most of them has it's own proprietary implementation, but at least following the spec guidance (Deployment descriptors, user/group, authentication and authorization concepts, etc...)

It's possible to implement custom authentication mechanics as some people do with Servlet filters, for example. On every request the filter check some session information against a DB and etc, but I still prefer the Realms concept since most containers offers more fine grained control for authorization/authentication.

On the tutorial we setup a JDBC Realm to be used on the Duke's Forest case study using JSF, which you can check as an example.
http://docs.oracle.com/javaee/7/tutorial/doc/security-advanced003.htm#BABEJJDE

Hope that helps.
Thank you for your comment and let us know if you need any help or have questions through your thesis!

Cheers
Hi! It actually depends on the container. As far as I remember, OC4J and WebLogic were both capable of understanding deployment descriptors (DDs) for both versions EJBs 2.x and 3.x. I made a post on my blog about it for WebLogic 10.3.4 (http://wmarkito.wordpress.com/2011/01/19/java-standards-in-weblogic-10-3-4/)

Although we highly encourage someone to migrate as the API is much more simpler and since you'd be upgrading your container and probable redoing all your tests with the EJB 2 app, it would be almost the same time you'd need to migrate from EJB 2 to EJB 3.

Here is a link to some migration tips, still based on OC4J but most are general guidance for EJB2xEJB3 migration. http://www.oracle.com/technetwork/middleware/ias/oc4j-twp-ejb3-migration-1013-133021.pdf

Also note that this migration generally means delete lines of code & configuration files, which is really nice and easy.

Thanks!
I guess you can check the online version of the tutorial and get a feel yourself about the chapters.

http://docs.oracle.com/javaee/7/tutorial/doc/overview.htm#BNAAW

The good thing about Java EE tutorial series is that they're all covered by examples, so you read theory and associate with practical examples, which make it easier even for non fluent Java programmers, but someone with some programming skills, to understand and follow. Volume 1 is really a good place to start.


Hi Folks!
Since it's my first sun certification, I would like to confirm the site to check the results for SCEA 5b?
Btw, since phase 2 will start soon (this month I think), my guess is that we should receive the results until next week, right ?

Regards