jianming chen

Ranch Hand
+ Follow
since Jul 21, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jianming chen

I used Spring integration in a lot of cases and really liked it. And I found it is also very handy to create cron integration jobs by using polling channel.
But in the case like I have huge files to process nightly, I can use Spring integration to do the work, but Spring Batch looks like more appropriate for the work.
so what is the best argument to make choice?
10 years ago
I extracted a piece of common process into separate sequence diagram to reduce clutter. And used a comment box to describe the reference.

I have all the jsps, managed beans, daos, and entities in the class diagram.
Taken means your test is accepted and waiting for grading. You should be OK. When I saw you said you wrote about 9-10 pages about assumptions and risk mitigation, I was stunned. I wrote less than 3 pages together, but I added up diagrams, and tried my best to explain it as clear as possible. In the essay, I worried most is my English grammar. But the result came out OK. I got not impressive but passed score. So trust yourself.
Who is the long waiting champion? I've waited 4 months + 2 days and finally got 1 % email today.
11 years ago
Finally, after 4 months + 2 days of waiting, the 1% email came in this morning. This is after checking email/certview/pearson over 1000 times (first month * 1 + second month * 2 + third time * 4 + fourth month * 8 * 3 ~ 1000). The first 3 months I only checked email, then I learned from this forum, result may appear on certview/pearson first, then I started to check 3 places, so the checking on fourth month times 3.

Assignment: DreamCar
Appear on essay: 25 June, 2011
1% email: 27 Oct, 2011

Thanks everyone on this forum, the posts helped me a lot to getting through this.
11 years ago
Just to clarify, I've bean officially waiting for 4 months by today.
11 years ago
Me too. I had transition voucher and finished assay on June 25. It's a torture for waiting so long.
11 years ago
I didn't show DAOFactory in any diagrams. Apparently, it makes the diagram very messy. So I just mentioned in the description of class diagram and component diagram. I'm still waiting for the final result. This may cost the points.
For Oracle Certified Master, Java EE 5 Enterprise Architect, the test code is 1Z0-864(step 1), 1Z0-865(step 2) and 1Z0-866(step 3). But if you are converting your step 2 from Prometric to Pearson, you will get a voucher code from Oracle and choose test 1Z0-848, then continue step 3 with 1Z0-866 on Pearson.
It is under Non-Proctored section with link "Master Assignment"

1. Do you have such a requirement?

We do have requirement like this. Sometimes we want to create some sort of quick tool outside of the Web Application which requires access to the database. Or sometimes Swing application.

You are adding one more dependency to your project, instead of reusing the existing dependecy on the EJB container.

As a matter of fact, before EJB 3, we have created application with Session bean in business tier, and Spring + hibernate dao in the integration tier.

Jaime Bravo wrote:
1. DAO is a pattern and not only the artifact.

Yes, but DAO is an integration tier pattern. Based on the DAO pattern definition on Core J2EE Pattern, Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data.

Jaime Bravo wrote:
2. On the other side, SLSB is an artifact and not the service tier, itself. So without problems, an SLSB could be in integration tier.

I think the idea of injecting EntityManager into SB is kind of mixing business tier and integration tier. The boundary of each tier is not clear any more. The major benefits of EJB container are security, transaction management. So it's best for business tier. DAO layer should be able to site outside of EJB container. Probably you want to re-use DAO component in other project deployed outside of EJB container.

DAO pattern should provide unified interface for any kind of resources. It doesn't make much sense to wrap any other resource accessing code inside SLSB. Such as LDAP access, Web service client etc.

Jaime Bravo wrote:
But actually look up a dependency from inside the DAO class is not a good practice, because you're creating a dependency with the lookup mechanism and details about the same one. And this fact adds another responsability to the DAO class, that is: find its dependencies. So the class becomes less cohesive. For example if you change the JNDI name for the dependendy then....you know. So Dependency Injection pattern is the winner against the Service Locator pattern.

Before EJB container can specify other classed inside DI context, I'd rather use other DI provider to manage dependencies in DAO layer.

4. "if you create DAO from SLSB, then you need to manage transaction attributes for DAO methods. Good practice is you should only declare transaction from Service tier.". Transactions like security is a cross-cutting concern so it could be present in any tier(including presentation, bussiness, integration and resources tiers of course)

For example JMS operations can be transacted and, WS supports transaction throught the OASIS specs and another standards.

Jaime Bravo wrote:
5. "What's more, if you create DAO from SLSB, that means, client can probably skip other service tier wrapper SLSB to directly call those DAO SLSBs. " You can prevent that situation. Take a look to this code:

Client could be the upper tier running inside same container. "Local" wouldn't avoid those clients directly access SLSB DAOs.
But what is the problem of putting DAO in the integration tier. Those DAOs will be still used by service tier SLSB. And EntityManager instances are transaction based, as long as the transaction started from SLSB, it is safe to lookup EntityManager inside any classes.

I think to separate DAOs from SLSB will create better separation. Another argument is if you create DAO from SLSB, then you need to manage transaction attributes for DAO methods. Good practice is you should only declare transaction from Service tier. What's more, if you create DAO from SLSB, that means, client can probably skip other service tier wrapper SLSB to directly call those DAO SLSBs.