Its been a while for not blogging. huehue... now im working in a different company and different business. Most of the time, I deal a lot with weblogic and etc. Alright, the first time dealing this application server with eclipse, I have a problem saying a non existence of home directory as in the title of this blog.
Upon googling around, I found out some discussion about this message. We need to point eclipse to some part of the directory of weblogic which is
Sunday, February 7, 2010
The path does not contain a valid WebLogic Server install
Monday, January 11, 2010
Project properties of JIRA
Currently, I am doing plugin development of JIRA. A request of my friend in hongkong. The functionality of this plugin is to clone the existing project with all the issues and the configuration of the project. Thus, this project will be akin of template to create 'real' project.
One interesting part of developing this plugin is cloning the issue type scheme. As we know that JIRA has issue type scheme to differentiate the type of the issue. JIRA divides the issue type scheme to be global and not global. By default, the global issue type scheme is Default Issue Type Scheme. But, strange thing is happening when I try to fetch the entity of Default Issue Type Scheme. When I use the following line to get the entity:
FieldConfigScheme fieldConfigScheme = issueTypeSchemeManager.getConfigScheme(existingProject);
and the above result is checked against the isGlobal() method of object fieldConfigScheme. The result is false which I think, it is supposed to be true. However, what i did to solve the problem is to check the object against the default fieldConfigScheme and it works.
Saturday, November 28, 2009
Guice-ing your code
During my learning on shindig, i found out that shindig using guice a lot on its code. Of course, I try to find out what is this tool about. After a little bit searching, I found out that the it is a bit similar with Spring. However, the authors say that it is different. They say that guice is not container and it is too light to be container. Anyway, just cut the bullshit and try to find out what is this tool about.
The first impression on my side after trying this tool is simple. Well, yes... it is indeed very simple as a dependency injection framework. What you need to do is the annotation. It makes all the things very simple.
The things that you need to remember (well, at least on my simple try) on regard of guice-ing your codes is the injector. The injector will try to lookup what are the fields, methods or constructor which need to be injected with object. Then, guice will inject it for you.
Below is a little bit example on it:
public static void main(String[] args) {
// TODO Auto-generated method stub
Injector injector = Guice.createInjector();
Customer customer = injector.getInstance(Customer.class);
customer.changeItem("barangnya");
}
The method injector.getInstance(Customer.class) will give you a complete object of customer with the injected notifier object. Below is the class of Customer:
public class Customer {
@Inject
public Notifier notifier;
public void changeItem(String message)
{
notifier.sendNotification(message);
}
}
Notifier is an interface. Guice will lookup on this interface to find out what class implement Notifier interface. In order to know what class which implemet Notifier interface, the interface should define annotation to tell the guice. Below is the interface of Notifier.
@ImplementedBy(SendSms.class)
public interface Notifier {
public void sendNotification(String message);
}
Its easy, isnt it (well, at least for this try :P)?
Monday, November 16, 2009
Building and Running shindig source on eclipse
Well, running or debugging any java sources managed by maven inside eclipse is as easy as running any simple application in eclipse. The only thing that you need is maven integration plugin. This is a super power plugin when your application deal a lot with maven. I just started to fall in love with eclipse instead of his competitor, Intellije IDEA, which always falls on the error of classpath. I need to delete the current working space and then rebuild it again. Its very annoying.
Yeps, maybe better to tell you a bit story of using this IDEA, a very lame tool to develop your application. The slogan should not be "Develop with pleasure", but it should be "Develop with pressure" instead. Many people agree with this slogan. Perhaps, we really need to tell them this new slogan. I have been using this IDEA to develop and learn about Confluence and JIRA source. However, everyday, I restart my computer, it always fall on the classpath error. It says that it cannot find xxx class while yesterday i build it without any problem. Then, the only thing that I can do is to build it again. It takes a lot of time indeed. Thus, I recommend you for not using IDEA to develop your application. It will only give you pressure because you spend a lot of time to rebuild your source.
Anyway, back to eclipse. I am using this tool to build, running and debugging the source of shindig. Yeps, it is pretty much easy. You just need to install the plugin on this url:
http://m2eclipse.sonatype.org/update/
well, you should get the list of plugins need to be installed. Just pick the core and then installed and restart your eclipse after finishing the installation. After that, you can simply open debug configuration and then create a maven command to run your source. You can use any maven plugin, I have used jetty and tomcat for the tries.
