Michael Enudi

Greenhorn
+ Follow
since Apr 24, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Michael Enudi

What are the major plus of using functional programming and what are the biggest plus of using it in our coding style.

Regards.
12 years ago

Hebert Coelho wrote:I do like to use Hibernate through JPA api because if you need to move from Hibernate to Toplink you will not need to change the classes code.

Only the persistence.xml and the jar. For performance I do not have any data about that. =/



We share the same view and currently that is what I do but I would really like to know what I could have been missing by not building on Hibernate core or using HQL.
Thanks
Hello All,

I have been quizzing myself through this lately trying to find out which is a better way to use hibernate: Hibernate core vs Hibernate through JPA api.

I have been using JPA api for over four years now and simply define the implementation framework in my Persistence.xml file. The rest of course is left to the implementation as I simply code against interfaces.
I have also attempted to use Hibernate implementation through JPA but have never used Hibernate core (simply because I don't want to learn a new HQL).

My question therefore is that for those with experience with any of both method, what would be the gains and loss of using one as against the other.

Many thanks.

Pedro Kowalski wrote:
To sum up - my point was that because you're heavily discouraged (or even forbidden) to spawn and manage threads in Java EE it doesn't mean that you cannot do some heavy multithreaded processing.
Cheers!



From what I have noticed, you could spawn your own thread but it will not be managed by the container. It will act as though it was just running on the JVM outside the container. A simple example is write a few TimerTask that does almost nothing and start it up with a Timer. Once the Timer schedule gets triggered, try stopping your Glassfish AS domain with

asadmin> stop-domain domain1

My observation is that the AS doesn't get the Timer to stop.

My workaround years ago, was to do all my scheduled work from a separate application (used spring with the quartz scheduler) to call the EJB methods. But once again, with the flexible scheduling feature in 3.1, that may not be necessary.

First and foremost is that I love spring. There are many reasons for this.
Also is that there is JSF that I prefer to Spring MVC mainly because of the vast amount of web components that it comes with out of the box (many more if using other implementation) amongst other reasons.

So my best bet is to get the best of both world. Hence my question: How far or deep does Spring allow for integrating Spring MVC or Webflow with jsf and how far or deep does the book discuss such an integration.

Regards
13 years ago

Pedro Kowalski wrote:Doesn't the asynchronous calls and CDI's observer allows you to achieve the given scenario?

Cheers!



Asynchronous EJB?? I haven't used them yet.. I have written codes in EJB 2.1 to 3 for production environment and really longed for that Asynchronous way of invoking EJBs. I have had to resort to MDB even for the smallest of asynchronous task. Its cool to know it was included in the latest version but I haven't begun employing them.
The same applies to CDI.

I would give it to you since that these features were added in the latest EJB release but I haven't gone 3.1


Regards.

Pedro Kowalski wrote:

Could you elaborate on this one? Why do you think that spawning and managing new threads by developer is a good thing?

Cheers!



Spawning threads to handle request ordinarily is not a good thing and as such is strongly advised against. But some parallel-like processing could be required which will entail developer doing something like



In this case we wouldn't be saying managing thread is a bad thing and though I haven't seen a reference of such, I will consider it bad to do it in an EJB.
Building EJBs means a developer's code must end up in an application server or EJB container. Coding spring means you can use an application server, a web container like tomcat or public static void main(String.. arg). This is another big advantage.

We must also remember that use of application servers come with a great deal of reward. Clustering & High availability are a part of them. Web containers like tomcats are breaching the gap though but if we agree that an AS like Glassfish was built on top of tomcat, we must also agree that they are features in the AS that are not given in the tomcat platform.

I code a great deal using EJBs but some small project just require nothing less than a small investment. In that scenario, getting an application server is not a way to go. Spring gets the win in that scenario.

Also note, doing multithreading on spring is a lot better and easier than working threads in EJB. Infact, the EJB specification forbids us from creating and playing around with developer-maintain threads. So, you know where you should go.

I don't have a problem with hibernate but the truth is that JPA has all we need. JPA is an architecture so if one wants a better of both worlds, use the hibernate implementation into JPA and apply hibernate extension in your codes. But remember other ORM frameworks have their own extension and extension are not portable. Infact, I still feel I shouldn't use hibernate.

I love both ways of doing things and I am sharpening my spring skills because, I can find a place for them in the enterprise. The choice for any given project will always rest on the nature of the project.
Good day,

My question are

1. Does the book handle LifeRay development (adding custom extensions to LifeRay portal)?
2. What about integrating other products on LifeRay portal. Example would be pentaho BI platform or custom web application
3. I would love to see a book compare products across functionalities. Like LifeRay, Alfresco, Microsoft Sharepoint and the like. Does the book handle that?


Regards.
13 years ago

Roel De Nijs wrote:If I understand correctly you implemented a fat client: the client makes seperate calls to lock, update/delete and unlock?



You are right. There was then an functionality to expire the cookie after some time lapse.
13 years ago

Roel De Nijs wrote:Passing OCMJD deserves a seperate thread, instead of just a post in someone else's passing ocmjd thread



oh sorry.... I was trying to be economical with threads. lol.

thanks

13 years ago
I am quite glad too that I made it, just like Chris. I guess Oracle reviewed our exams almost at the same time.
One thing makes me the more glad - I came to this site after doing a lot of my design and felt quite reluctant to change them. Sometimes, I suggested my design to other and was quickly refuted but I kept to it - especially with reference to implementing locking. It worked very fine but was a minority opinion. Nevertheless, I didn't fail to explain my design both in the code, user, design documentations and in the essay exam and I did it clearly. This increased my eagerness to get my result.
I submitted and did the essay since May. I have gone through my codes since to try doing redesign - for fun though.

the part of my choices that scared me most.

- Abstracting GUI codes - I had interface for all UI classes and embedded the actual Swing Codes in their implementation.
- Locking was done up to the client level. - I just thought about it that way but was advised against such in this forum and some friends as well.
- Lock expiration

Nevertheless, I am really grateful to members of this forum because they make it a complete ecosystem. I remember how I was corrected with some other issues. Thanks all.

Thank God.... I feel a lot more confident with myself.
13 years ago
Looking at the pages for the JEE 5 and 6 Web Service Developer pages from Oracle, there seem to be a big difference between the topic coverage for both exams.

Although, I would have love to take the more updated version of the exam, but I would love to get back to some fine details I must have skipped. I have been using java web service (mostly using jax-ws and jaxb) for over two years.

The most recent version of the exam seems to focus only on the aging soap architecture. One would expect the latest to be more comprehensive.

Does anyone really know why oracle will choose this route? I guess I am really going for the older version..*still confused though*

Regards
I will like to know if the pdf version of the study guide is ready?
I was about creating one but why do something when someone else might have done so.

Regards.
Hey Roel,

I had done all the submission process and concluded before my eyes fell on this thread. I had to start again, editted the script to suite my cases, struggle through some configuration and at last, I can say the feeling is worth it.
I don't know if I previously did anything wrong but now I just feel more confident.

Thanks for sharing.