Projekt 366 / 2008: Ein Jahr in Bildern
- Am 7. Februar 2009
- Von jmc
- In English, Flickr, Photographie, Project365
5
Flickr Sammlung mit allen Bildern
2008 – a year in pictures
Finally it’s here: my project 366 video with my views from 2008. Unfortunately I missed nearly every second day, so in the end it is more a project 180
Have fun watching!
Flickr set with all images
Project365 iCal Tool
- Am 6. Oktober 2008
- Von jmc
- In English, Project365
0
English version below!
Mittlerweile gibt es eine Menge Leute, die für sich ein Project365 angefangen haben und versuchen, für ein Jahr lang jeden Tag ein Photo zu machen. Vielen wird es sicher wie mir gehen, dass es mal Tage gibt, wo man eben genau das nicht schafft (aus welchem Grund auch immer).
Ich komme daher regelmäßig durcheinander und weiß nicht mehr, ob heute nun Tag 278 oder 280 ist. Darum habe ich ein kleines Tool online gestellt, mit dem sich jeder seinen eigenen iCal-Kalender erstellen kann. Das Startdatum kann beliebig gewählt werden – es muss also nicht der erste Januar gewesen sein.
Abonnieren kann man den Kalender (.ics) dann mit allen iCal-fähigen Kalenderprogrammen wie z.B. Apple iCal oder Google Calendar. Hier geht es zum Project 365 iCal creator.
English version
An english introduction could be found on the Project 365 iCal creator page.
Using JBoss EJB 3 with Eclipse RCP [Part 5]
- Am 20. Mai 2007
- Von jmc
- In Eclipse IDE, EJB 3.0, English, Java, JBoss
0
Some code to test
To get something working we need to insert some code in our RCP. We will insert it directly in the Application.java. All output will be echo to the console so that there is no need for a GUI:
Application.java
[java]
package bz.jmc.blog.rcp_with_jboss.rcp;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import bz.jmc.blog.tutorial.rcp_with_jboss.ejb.MyTestStatelessSessionRemote;
/**
* This class controls all aspects of the application’s execution
*/
public class Application implements IPlatformRunnable {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
*/
public Object run(Object args) throws Exception {
// EJB-Test
//
Properties properties = new Properties();
properties.put(“java.naming.factory.initial”,
“org.jnp.interfaces.NamingContextFactory”);
properties.put(“java.naming.factory.url.pkgs”,
“=org.jboss.naming:org.jnp.interfaces”);
properties.put(“java.naming.provider.url”,”localhost:1099″);
Context context;
try {
context = new InitialContext(properties);
MyTestStatelessSessionRemote sess =
(MyTestStatelessSessionRemote)
context.lookup(“MyTestStatelessSessionBean/remote”);
System.out.println( sess.sayHello() );
} catch (Exception e) {
e.printStackTrace();
}
// Normal RCP-App Code
Display display = PlatformUI.createDisplay();
try {
int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
if (returnCode == PlatformUI.RETURN_RESTART) {
return IPlatformRunnable.EXIT_RESTART;
}
return IPlatformRunnable.EXIT_OK;
} finally {
display.dispose();
}
}
}
[/java]
Now click on “Lauch an Eclipse application” in the “Overview”-tab to lauch the RCP. If anything is OK you should see a RCP window and an output similar to this one:

Hopefully this small tutorial is a little helpful.
Using JBoss EJB 3 with Eclipse RCP [Part 4]
- Am 20. Mai 2007
- Von jmc
- In Eclipse IDE, EJB 3.0, English, Java, JBoss
1
Dependencies und Buddy-Policy
First we need to declare the RCP dependend on the JBoss-plugin.

Now we define the Buddy-Policy in the JBoss plugin ( insert “Eclipse-BuddyPolicy: registered” in the Manifest.MF) and let the RCP-Plugin register as a buddy (insert “Eclipse-RegisterBuddy: org.jboss.client” in the Manifest.MF). Please ensure that there is always a blank line at the end of the Manifest.MF and there is no whitespace in front of the “Eclipse-…”!


Insert the EJB-Classes in our RCP-Plugin
We need to let our plugin know the EJBs it should work with. Inside the project we create a new folder called “libs” and copy the file MyTestStatelessSession.jar into it. Now we will refresh the project and add the JAR to the build path by right-clicking on the file and choose Build Path > Add to Build Path. The result should look like this:

As a last step we need to add the EJB-Jar to the classpath under Runtime. Without this step our JBoss-Plugin is not able to find the classes at runtime.

In the last part I will show you how to create some test code to ensure anything is working.
Using JBoss EJB 3 with Eclipse RCP [Part 3]
- Am 20. Mai 2007
- Von jmc
- In Eclipse IDE, EJB 3.0, English, Java, JBoss
0
Creating the RCP-Plugins
Using the menus File > New > Project we will create our RCP. All details you can find in the following 4 screenshots:




Creating the JBoss-Client-Plugin
Our plugin with the JBoss-Classes will be created similar to the RCP-plugin. But in this case we are using “Plug-in from existing JAR archives”.

In the next dialog we are choosing Add external and select all JARs in the %JBOSSHOME%/client folder. The auth.conf file should not be selected!


Now we need to define the dependency between the two plugins and create a Buddy-Policy. I’ll show that to you in part 4.



