Comments for Kevin's Bloghttp://blog.kevinlee.io
IT, Scala, Java, Web, UbuntuTue, 18 Mar 2014 04:56:47 +0000hourly1http://wordpress.org/?v=4.2.15Comment on Eclipse – “Too many open files” Problem by Eclipse – “Too many open files” Problem | Bikramhttp://blog.kevinlee.io/2009/08/11/eclipse-too-many-open-files-problem/comment-page-1/#comment-3737
Tue, 18 Mar 2014 04:56:47 +0000http://blog.lckymn.com/?p=365#comment-3737[…] view sourceprint? […]
]]>Comment on Java Generics: Generics in Real Life Programming by minecrafthttp://blog.kevinlee.io/2012/12/06/java-generics-generics-in-real-life-programming/comment-page-1/#comment-3271
Tue, 19 Feb 2013 21:56:04 +0000http://blog.lckymn.com/?p=826#comment-3271You really make it seem so easy with your presentation but I find this topic to be really something that I think I would never understand.

It seems too complex and very broad for me. I’m looking forward for your next post, I will try to get the hang of it!

]]>Comment on Easier and Better Way to Use JDBC by Java Generics: Generics in Real Life Programming « Kevin's Bloghttp://blog.kevinlee.io/2011/09/11/easier-and-better-way-to-use-jdbc/comment-page-1/#comment-3240
Thu, 06 Dec 2012 09:12:57 +0000http://blog.lckymn.com/?p=599#comment-3240[…] having to decide the type when designing the API. One example can be found in my old post about Easier and Better Way to Use JDBC. Simply, it makes use of callback function object much more […]
]]>Comment on Java Uses Call By Sharing by Kevinhttp://blog.kevinlee.io/2010/11/12/java-uses-call-by-sharing/comment-page-1/#comment-2834
Thu, 13 Oct 2011 23:02:45 +0000http://blog.lckymn.com/?p=587#comment-2834Hi, Pratik

No, you can’t use call-by-reference in Java as Java doesn’t have it.
If you run the code snippet you put here, you will get 10 but NOT -1.

void fun(MyObject inner){
inner.x = 10; // Working on the reference to the instance of MyObject which is assigned to the variable 'outer’.
inner= new MyObject(); // create a new reference, and it is NOT visible by the caller.
inner.x = -1; // It will never be visible by the caller.
}

]]>Comment on Java Uses Call By Sharing by Pratikhttp://blog.kevinlee.io/2010/11/12/java-uses-call-by-sharing/comment-page-1/#comment-2833
Thu, 13 Oct 2011 20:51:35 +0000http://blog.lckymn.com/?p=587#comment-2833Hi, this post has really been helpful to me to understand the difference between passing methods. Thanks for that.

My question is : had we been using call-by-reference in the given example then would the following be correct?

What your code does is changing object state which means it assigns a new value to the field (the object member variable) y.

So

m.show(x);

is ‘Call By Sharing’ as it passes an object x (it is indeed the object reference of the class Xyz stored in the variable x) to the show() method.
Then what the show() method does is changing the state of the x.

x.y = 15;

This is changing the object state by reassigning a new value to the variable y. Notice that you did not pass the variable y in the object x but the object itself.

as you can re-assign a new object reference of the new instance of the type Xyz to the parameter variable x but this is not visible by the caller, the main() method, so after calling the show() method, x will still contain the reference of the first Xyz object you created before calling the show() method, and it has 10 in the variable y.

I am planing to put much better examples for this topic yet just have no time at the moment. My company is about to launch a new web application so I am, just like others, really busy.
I’ll put the examples as soon as possible.

and the plain text with the fixed-width font for
[code lang=”plain” gutter=”false”]
[/code]

Regards,
Kevin

]]>Comment on Java Uses Call By Sharing by Sekharhttp://blog.kevinlee.io/2010/11/12/java-uses-call-by-sharing/comment-page-1/#comment-1831
Mon, 13 Jun 2011 07:47:33 +0000http://blog.lckymn.com/?p=587#comment-1831Hi, Please execute the following code, and please let me know in what category it will come.

//!!!!!!!!Reference to object ‘outer’ will be disposed only in scope of this method !!!!
inner= new MyObject(); //create new reference.
nner.x = -1; //Working on new local reference
}

MyObject outer = new MyObject();
fun(outer);
print( outer.x ); //10

]]>Comment on Java Uses Call By Sharing by raghavhttp://blog.kevinlee.io/2010/11/12/java-uses-call-by-sharing/comment-page-1/#comment-1709
Mon, 04 Apr 2011 06:38:07 +0000http://blog.lckymn.com/?p=587#comment-1709Can you plz explain with a example..
]]>Comment on Java EE Application Development using Tomcat, OpenEJB and Hibernate by Kevinhttp://blog.kevinlee.io/2009/10/17/java-ee-application-development-using-tomcat-openejb-and-hibernate/comment-page-1/#comment-1704
Thu, 31 Mar 2011 05:57:54 +0000http://blog.lckymn.com/?p=380#comment-1704http://blog.lckymn.com/2009/11/01/web-service-development-using-tomcat-and-openejb/comment-page-1/#comment-1703
]]>Comment on Web Service Development using Tomcat and OpenEJB by Kevinhttp://blog.kevinlee.io/2009/11/01/web-service-development-using-tomcat-and-openejb/comment-page-1/#comment-1703
Thu, 31 Mar 2011 05:56:01 +0000http://blog.lckymn.com/?p=432#comment-1703Before I say anything, I think should clarify certain things you need to know.

1. Your explanation is insufficient to fully understand your problem so my answers would be very generic. It is very hard to answer those kinds of questions without actually having the code & libraries you have, your development environment & configuration, the scenarios that your application / service should handle, etc., and that’s one of the reasons why people hire software development consultants.

2. I do NOT use OpenEJB at all.

3. Then why did I post those two blog entries regarding using OpenEJB, Tomcat and Hibernate, and OpenEJB and Web Services?
The reason is because I could not find any detailed tutorials for those technologies (you may already know it as you googled it already, I guess) so did it for others looking for it. I had some experiments and found several ways to do it and posted the simplest and easiest ones. Based on my experience, it is not convenient at all to implement those technologies. So if you decide to use it, I believe, you will experience many problems regarding only implementing those rather than solving your actual problems in the business logic (e.g. I had a problem with using OpenEJB and other versions of Hibernate than the one I mentioned in the blog post so I had to use that particular version).

4. What do I use then? I use the Spring Framework.

5. Does the Spring Framework solve the problems you mentioned? Yes, it does solve those easily although I don’t know the details of yours so cannot really say with one hundred percent certainty.

6. So do I recommend it instead of using OpenEJB? Yes, I do. If you can use the Spring instead of OpenEJB, you can use almost any technologies, libraries and frameworks with the Spring so that you don’t really need to be concerned about combining different technologies together (of course, it is still not the silver bullet, you may not use it for everything, but in general, for normal applications and web services, it is just sufficient). However, you need to learn how to use it, and it might not be as easy as reading one or two blog posts to figure it out. I still recommend it though. It is useful now and will be more and more useful in the future as your application grows and its requirements change.

Now, in regard to your questions,
=================================
how to add the MDBean project in addition to the existing top to bottom up axis2 webservice project?
-You can just use OpenEJB to have both the MD Bean and web service if your axis2 web service complies with JSR-181 like this one then it will be easy to run it with OpenEJB and without Axis2.
-Or what you want is sending SOAP messages over JMS, you probably want to use some other library for JMS working with Axis2 such as JMS Transport.

How to deploy this new addition MDBean/openejb project.jar in to tomcat+openejb in Lunux?
-As long as you use the Java platform and the OS you use supports it, you don’t need to worry about deploying those to the tomcat server in different OSs.

How to deploy the openejb based MDB project.jar in to tomcat+openejb ?
-It is up to you. You can add it to the web service you’ve already got or can make a separate message service and add it.

How to send message object to MDBean which would also run in same tomcat having openejb.war?
-It is also up to you. You can have both in the same project and make them directly communicate or have them separately and use message service / web service to communicate. It depends on your implementation of the technologies.
==================================

Finally, mixing and combining different technologies is not an easy topic especially when you have some legacy applications with which your new applications must work. If it is for your company, I rather recommend you hire the consultant. If it is solely for studying, you can anyway try it by making message service then understand it and try to combine it with the web service. Without understanding each technology, you cannot easily use these together. Well, if I were you, I would rather spend time on studying the Spring Framework. Don’t get me wrong. I’m not a fan of it. It is just suited for my needs. One day, if I find any better one, I will definitely use the new one.

Regards,
Kevin

]]>Comment on Web Service Development using Tomcat and OpenEJB by subbahttp://blog.kevinlee.io/2009/11/01/web-service-development-using-tomcat-and-openejb/comment-page-1/#comment-1702
Thu, 31 Mar 2011 03:39:57 +0000http://blog.lckymn.com/?p=432#comment-1702Kevin,

Sorr for this repost. This would be the correct and related thread to ask for the webservice related and , how to deploy openejb MDBean project.jar into tomcat+openejb environment !

Thanks for your instructions based details on the openejb.
Could you suggest the same type of details
– How to develop the MDBean project and how to deploying openejb MDBean project.jar in to tomcat + openejb integrated environment in Linux?

Little back ground on my side,
We have existing webservice project developed based on axis2 in tomcat 6.0.32 using top to bottom approach.
Now, we want to add asynchronous message processing features. So, exploring to use the JMS + MDB. To add this feature in tomcat, I am working to use the openEJB.
And, I was trying to find best way to add on this new project by adding openEJB.war to existing tomcat.
But, trying to simplify the steps to
how to add the MDBean project in addition to the existing top to bottom up axis2 webservice project?
How to deploy this new addition MDBean/openejb project.jar in to tomcat+openejb in Lunux?
How to deploy the openejb based MDB project.jar in to tomcat+openejb ?
How to send message object to MDBean which would also run in same tomcat having openejb.war?

I really thankfull for your kind response.
—
Subba

]]>Comment on Java EE Application Development using Tomcat, OpenEJB and Hibernate by subbahttp://blog.kevinlee.io/2009/10/17/java-ee-application-development-using-tomcat-openejb-and-hibernate/comment-page-1/#comment-1701
Thu, 31 Mar 2011 03:31:43 +0000http://blog.lckymn.com/?p=380#comment-1701Kevin,
Thanks for your instructions based details on the openejb.
Is it possible to add same type details on deploying openejb project in to Linux ?

We have existing webservice project developed based on axis2 in tomcat 6.0.32 using top to bottom approach.
Now, we want to add asynchronous message processing features. So, exploring to use the JMS + MDB. To add this feature in tomcat, I am working to use the openEJB.
And, I was trying to find best way to add on this new project by adding openEJB.war to existing tomcat.
But, trying to simplify the steps to
how to add the MDBean project in addition to the existing top to bottom up axis2 webservice project?
How to deploy this new addition MDBean/openejb project.jar in to tomcat+openejb in Lunux?
How to deploy the openejb based MDB project.jar in to tomcat+openejb ?
How to send message object to MDBean which would also run in same tomcat having openejb.war?

I really thankfull for your kind response.
—
Subba

]]>Comment on Java EE Application Development using Tomcat, OpenEJB and Hibernate by Kevinhttp://blog.kevinlee.io/2009/10/17/java-ee-application-development-using-tomcat-openejb-and-hibernate/comment-page-1/#comment-1606
Fri, 24 Sep 2010 10:44:43 +0000http://blog.lckymn.com/?p=380#comment-1606Prafull, if you click the link to the OpenEJB download page, you can see ‘OpenEJB for Tomcat’ which is the ‘openejb.war’ file. Please check out the page again.
]]>Comment on Java EE Application Development using Tomcat, OpenEJB and Hibernate by Prafullhttp://blog.kevinlee.io/2009/10/17/java-ee-application-development-using-tomcat-openejb-and-hibernate/comment-page-1/#comment-1605
Fri, 24 Sep 2010 07:38:13 +0000http://blog.lckymn.com/?p=380#comment-1605When i download openejb.war it downloads openejb.zip file
how di i convert it
Thanks
]]>Comment on Enable Ctrl+Alt+Backspace Again by Andihttp://blog.kevinlee.io/2009/05/03/enable-ctrl-alt-backspace-again/comment-page-1/#comment-1588
Sun, 15 Aug 2010 15:15:46 +0000http://blog.lckymn.com/?p=123#comment-1588Thanks, just what I was looking for.
]]>