First Experiences with the Adobe Data Model – Setup

Categorized Under: Adobe, Flex, LiveCycle

A week ago or so, Adobe has put LiveCycle DataServices 3 on labs (http://labs.adobe.com/technologies/livecycle_dataservices3/), and one of the new things is the Adobe Data Model and the Modeler plugin code name Fiber. In this post I want to take a look at the setup of Fibre. It’s not a complete tutorial, I’m just taking notes wile trying to figure out how it works.

Download and install LCDS 3

You will find several download files on labs, next to all the documentation you should also find the new version of lcds and the modeller plugins. I installed lcds 3 with Tomcat next to older versions of lcds. So my lcds 3 root directory is C://Flex/lcds/lcds3.

After installation, let’s try to start lcds 3. To avoid having Tomcat complaining that he can not find the database, first go into [lcds-root]/sampledb/bin and start the database (startdb.bat / startdb.sh). Then go into [lcds-root]/tomcat/bin and start Tomcat (startup.bat / startup.sh).

If the installation was successful, you should be able to browse to http://localhost:8400 where three links will take you further to the Console, Sample apps (TestDrive) and a Template application.

This was easy and worked as expected, no problems so far.

Data Modeler on Eclipse

I use an Eclipse JEE Ganymede where I have also several other plugins installed like Flash Builder, Subclips, CFEclipse, Spring & Maven etc. So this should be a good test to see if all the diffrend plug-ins work together with the Modeler. There are several ways to install a plugin in Eclipse and because the Modeler comes as a zip file, I first tried to install it using the Eclipse update mechanism where you can point to an archive file. Unfortunately this didn’t work, and as it was not possible to do it with the unzipped archive either, I was forced to copy/override the plugins folder into my Eclipse.

After a restart of Eclipse, it worked the first time, but after a second restart, Eclipse was not able to display the modeler views again. I’m not sure how stable it already is but it has a 1.xxx version number, so I thought I should first update all my Eclipse plugins. And yes, after the update the Modeller views where accessible again and I did not have any further problems since. Maybe a usefull advise could be to start experiment on an separate Eclipse, anyway I didn’t and my Eclipse still works without any troubles.

One issue I have is that I can’t find a way to uninstall it other than to take out the added jars by hand. The plug-in is listed under the Eclipse plug-in Details but the uninstaller functionality of Eclipse does not list it yet. But hey, why should we want to uninstall it anyway?

After adding the plugin and restarting Eclipse, go to Windwos -> Open Perspective -> Other and you should find the Adobe Data Model Perspective at the top of the list.

Update:

I don’t like the copy/paste I explained above and while experimenting with Eclipse 3.5 Galileo and the actual version of Flash Builder i13, I learned how dropins can be used to link external plugins into Eclipse. I thought I could try the same with the Adobe Data Modeler. The following stuf is on your own risk, this is not supported, approved or even documented by Adobe in any way!

So, I added a new directory called “Adobe Data Modeler Plug-ins Beta” in C:\Program Files\Adobe\, inside the modeler directory I added an eclipse directory and inside this I copied the plugins folder of the modeler. So I ended up with C:\Program Files\Adobe\Adobe Data Modeler Plug-ins Beta\eclipse\plugins which contains the modeler plugins.

Now, if you look in your Galileo eclipse root directory, you should find a folder called dropins. Analog the flexbuilder link I added a text file called com.adobe.model.core.link containing one line of code: path=C:/Program Files/Adobe/Adobe Data Modeler Plug-in Beta

After starting up Eclipse, go to Help -> About Eclipse -> Installation Details and look into the plug-ins tab. If anything went right, you should see the Adobe Data Model plug-ins.

First impressions

The perspective looks good. At the left side you will find the Package Explorer and the RDS Dataview which will be familiar to ColdFusion developers who worked with the RDS connection tools before. At the right side next to the Outline is the Services and Styles views which are only available in design view of a data model and where I don’t yet know what I can do with it. At the bottom is the Properties and the Problems views, which I understand from the first look at it. Of course this is Eclipse, so you will be able to change this in any way you like.

ModelerOverview-small

Intermission

I thought, now would be a good time to look at the videos provided in labs. (http://labs.adobe.com/technologies/livecycle_dataservices3/videos/) Needlessly to say, I’m quite impressed, the possibility to write java code, ahm without writing it, seems quite cool to me. Though, I’m not yet sure how I have to sell this to my Java developers. ;-) It looks like Fiber is Flash Catalyst for the model and database integration. I can’t wait to use them together!

RDS Configuration

Ok, now as the appetite is here, lets start as it is explained in the video. I first tried to access my database over the RDS panel. So open Windows -> Adobe -> RDS Configuration or open the properties in the RDS Dataview panel. There is already a first Connection called lcds (localhost). The settings look fine to me, host name 127.0.0.1, Port Number 8400 and the context root is lcds, so lets hit the “Test Connection” button.

Ouch, there is an 404 error thrown at the server, telling me that it did not find /lcds/CFIDE/main/ide.cfm! hm, do I need ColdFusion here? :-)

This is definitively the moment to look at the “Getting Started Guide” on labs, where we can find indeed how to setup the RDS server properly. (http://labs.adobe.com/technologies/livecycle_dataservices3/gettingstarted.html)  As explained under “Configure RDS on the Server” the server configuration is commented out, so we have to enable it first, makes sense.

So, let’s go to [lcds-root]/tomcat/webapps/lcds/WEB-INF/web.xml and uncomment the rds server. The file now also reveals the mystery about CF, of course there is just a mapping /CFIDE/main/ide.cfm pointing to the RDSDispatcherServlet, I guess this is to keep it in sync with the CF integration. If you keep the “useAppserverSecurity” flag true, you will also have to add a user in [lcds-root]/tomcat/conf/tomcat-users.xml which is also described properly in the guide. For my local tests, I decide to just set the flag to false. After a restart of Tomcat and being back in Eclipse, I check back the RDS connection again, and this time everything works as expected. Very nice.

Of course, there is no database available yet, because on the lcds context root is not database configured. If you don’t have a database available on you local test system, you can add a new RDS Connection pointing to the samples database. Just set the connection also to localhost on port 8400, but with the Context Root of lcds-samples. You should now be able to see the ordersDB database from the samples apps.

Add your own database

First we need the right connector, I want to work with a mysql database and it’s nice to see that lcds 3 already comes with several connectors. Take a look into the [lcds-root]/tomcat/lib/lcds directory. There are connectors for most important database systems available.
Now open [lcds-root]/conf/Catalina/localhost/lcds.xml file and add following code after the JTOM transaction tag:

<Resource name="jdbc/modelDB" type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    maxIdle="2" maxWait="5000"
    url="jdbc:mysql://localhost:3306/model-db"
    username="administrator" password="password" maxActive="4"/>

This should do the trick, but of course you have to use your own database settings. After a restart of the application, you should be able to connect to your own database in the RDS Dataview.

I think this is a good moment for a (coffee) break. I will continue the story in my next post.

Sincerely yours,
Roland

One Response to “First Experiences with the Adobe Data Model – Setup”

  1. [...] First Experiences with the Adobe Data Model – Setup [...]

Leave a Reply