Perşembe, Temmuz 26, 2007

Remote Debugging

Her java uygulaması kendine ait bir jvm içinde çalışır. IDE de kod yazdığınız zaman debuglama işini aynı jvm içinde yapmış olursunuz.

Fakat java size bir jvm'e remote bağlanarak debuglama imkanı da tanır.

Bunun için jvm ayağa kalkarken gerekli olan ayarların yapılmış olması gerekiyor.

Aynı makina üzerinde bile olsa birbirinden bağımsız başlatılan iki uygulama ayrı jvmlerde çalışacaklarından remote debugging dışında başka bir debug şansı yoktur.

Örneğin Eclipse'i açtınız kodununuzu yazdığınız App. Server'ınızı eclipse içinden değilde kendi startup scriptini manuel çalıştırarak başlattınız. Sonra oluşturduğunuz .ear dosyasını deploy ettiniz ve sorun çıktı (hep böyle olur :-)) hatta genelede test serverlarını localimizde çalıştırmayız.

Bunun için Weblogic ayarlarını aşağıdaki linkte bulabilirsiniz.

WebLogic Remote Debugging Ayarları

Eclipse'in App. Server olarak JBoss kullanarak Ayarları


Eclipse'in ayarlarını öğrendikten hangi remote JVM'e bağlandığınızın bir önemi yok zaten.

Herkese iyi debuglar... (Umarım az ihtiyacınız olur :-))

Çarşamba, Temmuz 25, 2007

PS3 & Linux (Fedora 7 installation)

Normally I don't write in English, but this post will be a manual.

My configuration;
PS3 ntsc version (bought from amazon)
46x2000 Full HD
usb mouse & keyboard

First of all you need to download

1. otheros
2. Fedora 7 ppc

Now we are ready to start installation.


1. extract otheros file to a device such as usb memory stick, sd card etc.
2. burn fedora image to a dvd
3. System Settings-Install Another OS
4. Boot to Other OS
5. Wait to see boot selection
(leave your mouse on 32bit otherwise it will boot to 64bit before you can do the following)
6. press Ctrl-Alt-F1 for TTY
7. type
cd /var/tmp/mnt-scd0*/ppc/ppc64
press enter
8. type
/sbin/kexec -f --initrd=ramdisk.image.gz --command-line="video=1080p" vmlinuz
press enter
(or video=720p this choise is related to your TV configuration)
9. rest is normal linux installation

I am going to edit this post about this topic

Problems
I have black borders when I use 1080p and resolution is lower then 1920x1080 60hz

tonight i will have an update I hope system will become more stable

Çarşamba, Şubat 14, 2007

Weblogic 8.1 ve MyFaces

Son günlerdeki uğraşlarım konusunda kısa kısa aktarımlarda bulunacağım.
Weblogic 8.1 sp2 ve sp5 versiyonlarında MyFaces çalıştırmak için karşılaştığım problemler ve çözümleri sırasıyla şöyle;

İlk önce sp5'te uygulamayı ayağa kaldırmak için tomcat'in 5.5 versiyonundan jsp-api.jar ve servlet-api.jar alıp web-inf/lib altına koydum. sp5 için bu kadarı yetmesine rağmen sp2de aynı uygulama çalışmama konusunda direndi.

http://forum.java.sun.com/thread.jspa?threadID=569337&messageID=4151778

bu adresten edindiğim bilgilerle web.xml de FacesServlet'in ayağa kalkmasını sağlayan Listener'ı comment out ederek

<!--
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
-->

kendi projeme aşağıdaki gibi Listener'ın replacement'ı olan bir servlet yazıp;

public class InitFacesContext extends GenericServlet {
StartupServletContextListener listener;
public void destroy() {
super.destroy();
listener.contextDestroyed(new ServletContextEvent(getServletContext()));
}
public void init(ServletConfig arg0) throws ServletException {
super.init(arg0);
listener = new StartupServletContextListener();
listener.contextInitialized(new ServletContextEvent(getServletContext()));
}
public void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException {
}
}

ilk önce bu servletin çalışmasını sağlayacak alttaki tag'i web.xml'e ekledim

<servlet>
<servlet-name>InitFacesContext</servlet-name>
<servlet-class>com.gene.volts.servlet.InitFacesContext</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>