Fusion Middleware

Load balancing with AS 10.1.3 and with Web Cache

Edwin Biemond - Wed, 2008-07-23 13:50
This week I had to setup load balancing on three 10.1.3 OC4J containers so the load is spread is over the servers and when an oc4j container spontaneous reboots the others servers can handle the load until the container is back. We had a little problem where the production server (windows 32bits) gave a out of memory exception, an out of swap error and the application users had to wait for 5 minutes before they can work again.
I first used Oracle Web Cache which is a 10.1.2 Application Server product. This was pretty easy but very stupid in 10.1.3. ( the second part of this blog I will show you how easy this is in 10.1.3
The first step in Web Cache is to configure the listening ports for the load balancer.


In my case Web cache will listen on port 80 and 7778.

Now we can add the application servers ( original servers)

Define a website url for which you want to load balance, I will use the Enterprise Manager Website /em

The site is /em/
Add a site to server mapping where we connect the site em to the availible AS server
Now we have to make sure that a new web session is always run on the same original server else we cannot log in.

Use for the em website as session JSESSIONID and OC4J-based as binding mechanism. We are now ready with Web Cache. The only thing still to do is to add a virtual hsot to the httpd.conf of the Application Servers. We have to do this else the em website is redirected to one of the application server instead of the load balancer adress.


NameVirtualHost XPCND7010XMP.work.local:7777
<VirtualHost XPCND7010XMP.work.local:7777>
ServerName XPCND7010XMP.work.local
Port 80
</VirtualHost>
XPCND7010XMP.work.local:7777 is the application server on port 7777.
inside VirtualHost we use the adress of the load balancer.
That's all in webcache.

You don't have to do this in 10.1.3. Just install on the load balancer a http server ( custom install in the application server installer ).
Add in every AS Home the following topology lines to the opmn.xml and you have a cluster.

<notification-server interface="ipv4">
<port local="6100" remote="6200" request="5003"/>
<ssl enabled="true" wallet-file="$ORACLE_HOME/opmn/conf/ssl.wlt/default"/>
<topology>
<discover list="*233.0.0.2:1500"/>
</topology>
</notification-server>
On the application servers you don't need the http servers anymore so you can disable.
In this cluster you can have only one Enterprise Manager application so you have to disable it on all the application servers except one. ( server.xml and default-web-site.xml )
That's all in 10.1.3

Starting a new project

Steve Jones - Wed, 2008-07-23 09:50
Okay so I'm starting off a new programme at work, its not in the "normal" space of most enterprise IT but its going to include business change, IT implementation, a bunch of integration and a load of web tech. Over the course of the next few months I'll run through the various things that I've had to do, why I had to do them and what worked and what didn't. I'll tag the posts "gerald" to give a
Categories: Fusion Middleware

Wordle

Billy Cripe - Tue, 2008-07-22 10:17
check out wordle - a word clouding tool. This is the start of an interesting kind of concept mapping. It displays words and sizes based on frequency. This is the Wordle cloud of this blog's rss feed: (click it for... billy.cripe http://blogs.oracle.com/fusionecm
Categories: Fusion Middleware

Oracle Open World Around The Corner...

Bex Huff - Mon, 2008-07-21 18:31

Oracle Open World starts September 21st... That's just 2 months away! Woot! Goosebumps, I tell you.

The conference last year was a bit chaotic for me... when I'm presenting, I never feel like I have enough time... And with 60,000 attendees, it can get a little crazy. This year will probably be similar. I'm doing a variation on my introduction to integrating with Stellent talk, because it was one of the top ten talks at Collaborate 08 a few months back. Nice... The IOUG folks were kind enough to score a spot for me, and I'm gonna soup up the talk a bit. Andy and I will probably also giving an ECM business-strategy presentation that aligns with our upcoming book.

Then I can relax!

I haven't looked at too many of the other presentation yet, but the ones that won Jake's "pick a session" contest on Oracle Mix all look good. I'm glad to see that Dan Norris will be presenting on how to be an Oracle ACE... also, Lonneke Dikmans will be presenting a shootout between Oracle WebCenter and BEA Weblogic.

I'm sure that last one will be hyper political...

Its also good to see Eric Marcoux presenting on a comparison between Oracle Portal, Oracle WebCenter, and Stellent... its nice to see a Stellent presentation make the top 25. Although it will be tough to give a decent comparison of all 4 Oracle Portal Products PLUS Stellent in one talk... Good luck to Eric.

Your turn: are you going to Open World? If so, what would you like to see?

read more

Categories: Fusion Middleware

OpenIDs problems don't seem to be going away

Nishant Kaushik - Mon, 2008-07-21 16:52
I got news today that MySpace is joining the OpenID revolution. This supposedly brings the number of OpenID-enabled accounts to over half a billion. Maybe it looks like good news for OpenID, but isn't this actually a problem? Isn't... Nishant Kaushik
Categories: Fusion Middleware

OOW08 Mix presentations and ADF & SOA

Edwin Biemond - Mon, 2008-07-21 15:54
The result of the oracle openworld 2008 mix competition are published. It really surprises me they are not so much ADF (not any) or SOA presentations selected as I would expect. The new ADF Rich Faces and Soa suite 11g are really cool stuff. So why is that, is ADF too difficult ? or are there already too much ADF presentations at OOW08. I think that the Oracle customers are now using the database, forms/designer and the BI tool of Oracle. I believe that the customers want to use ADF but the learning curve is too high that's why APEX and BI are so popular. The Oracle customers cannot transform their classic developers to ADF developer so easily.
The ADF developer community is not so large, it has to be a lot bigger to survive. To make this happen, Oracle has to promote and invest into JHeadstart ( it has to be more like APEX ) so the customer will make the step to go from APEX or Forms to Jheadstart. The second step Oracle has to do is to make sure that the BEA java developers will use ADF. So the ADF community will be large and important else ADF will only be used in the Oracle Apps.
By the way here are the SOA or Portal presentations which are selected by the Oracle mix people for OOW08.
BEA Aqualogic versus Oracle Fusion Middleware shoot out by Lonneke Dikmans
Oracle Portal, WebCenter and Stellent – which one should you use ? by by Eric Marcoux
How to Effectively use Web 2.0 Technologies within a Portal by Howard Block.

Thinking about service levels

Steve Jones - Mon, 2008-07-21 06:03
One piece that I've banged on about consistently for the last few years has been the importance of SLAs. SLAs that define not simply things like security and reliability (technical elements) but which also define the business contract and costs. These contracts must always work two ways. The consumer has a contract of things they must do to invoke the capability and have certain expectations
Categories: Fusion Middleware

Google Map Rolling on a Mac

Steve Jones - Mon, 2008-07-21 04:37
I love "silly" demos that combine technologies. Raul Guiu has written a very small app that uses the Mac's motion sensor to navigate around Google Maps. Now my first thought was "nice demo, can't see an application" then I started playing "follow the roads" which was fun for a short period of time. Now however I can think of quite a few bits where adding in motion and GPS could really
Categories: Fusion Middleware

CRUD operations in Flex with ADF BC

Edwin Biemond - Sat, 2008-07-19 04:57
With Adobe LifeCycle Data Services we can do CRUD operations in Flex. For this example I am using ADF Business Components ( I am an Oracle Dude), but you can always use Hibernate or a SQL datasource instead. Because I choose ADF BC I have to do a lot. Maybe someday there will be a standard adf bc adapter for LifeCycle and then I only have to some configuration work (like in hibernate).
The great thing is that LifeCycle keeps all the clients in sync which are using the same data service, even in different flex projects ( Data Push).

First you have to setup a jdeveloper LifeCycle project, see my previous post
For my example I am using the employee table in the HR schema. Make sure you the java types instead the Oracle java types else you have to do some extra casting

To get this working in LifeCycle we have to create three classes and do some configuration work.
Create an employee object class, I already tried the use the RowImpl of the employee viewobject but this does not work in all cases. When I update a record in Flex the updated RowImpl is send back to the lifecycle server where I got a dead viewobject row error. So we have to do it manually. To make life a little bit simplier I use two methods which can transform this employee object to EmployeeRowImpl and back.

package nl.ordina.flex.adfbc;

import java.math.BigDecimal;
import java.sql.Date;

import nl.ordina.flex.model.dataaccess.EmployeesViewRowImpl;

public class Employee {

private BigDecimal employeeId;
private String firstName;
private String lastName;
private String email;
private String phoneNumber;
private Date hireDate;
private String jobId;
private BigDecimal salary;
private BigDecimal commissionPct;
private BigDecimal managerId;
private BigDecimal departmentId;


public Employee() {
}



public Object getAttribute(String attribute) {
if ( attribute.equalsIgnoreCase("firstname")) {
return firstName;
}
if ( attribute.equalsIgnoreCase("lastname")) {
return lastName;
}
return null;
}

public Employee transform( EmployeesViewRowImpl row) {
Employee emp = new Employee();
emp.setEmployeeId(row.getEmployeeId());
emp.setFirstName(row.getFirstName());
emp.setLastName(row.getLastName());
emp.setCommissionPct(row.getCommissionPct());
emp.setDepartmentId(row.getDepartmentId());
emp.setEmail(row.getEmail());
emp.setHireDate(row.getHireDate());
emp.setJobId(row.getJobId());
emp.setManagerId(row.getManagerId());
emp.setPhoneNumber(row.getPhoneNumber());
emp.setSalary(row.getSalary());
return emp;
}

public EmployeesViewRowImpl transform( Employee employee) {
EmployeesViewRowImpl row = new EmployeesViewRowImpl();
row.setEmployeeId(employee.getEmployeeId());
row.setFirstName(employee.getFirstName());
row.setLastName(employee.getLastName());
row.setCommissionPct(employee.getCommissionPct());
row.setDepartmentId(employee.getDepartmentId());
row.setEmail(employee.getEmail());
row.setHireDate(employee.getHireDate());
row.setJobId(employee.getJobId());
row.setManagerId(employee.getManagerId());
row.setPhoneNumber(employee.getPhoneNumber());
row.setSalary(employee.getSalary());
return row;
}

public void setEmployeeId(BigDecimal employeeId) {
this.employeeId = employeeId;
}

public BigDecimal getEmployeeId() {
return employeeId;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getFirstName() {
return firstName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public String getLastName() {
return lastName;
}

public void setEmail(String email) {
this.email = email;
}

public String getEmail() {
return email;
}

public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}

public String getPhoneNumber() {
return phoneNumber;
}

public void setHireDate(Date hireDate) {
this.hireDate = hireDate;
}

public Date getHireDate() {
return hireDate;
}

public void setJobId(String jobId) {
this.jobId = jobId;
}

public String getJobId() {
return jobId;
}

public void setSalary(BigDecimal salary) {
this.salary = salary;
}

public BigDecimal getSalary() {
return salary;
}

public void setCommissionPct(BigDecimal commissionPct) {
this.commissionPct = commissionPct;
}

public BigDecimal getCommissionPct() {
return commissionPct;
}

public void setManagerId(BigDecimal managerId) {
this.managerId = managerId;
}

public BigDecimal getManagerId() {
return managerId;
}

public void setDepartmentId(BigDecimal departmentId) {
this.departmentId = departmentId;
}

public BigDecimal getDepartmentId() {
return departmentId;
}
}



Create an EmployeeService which does the CRUD operations in ADF BC.

package nl.ordina.flex.adfbc;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import nl.ordina.flex.model.dataaccess.EmployeesViewImpl;
import nl.ordina.flex.model.dataaccess.EmployeesViewRowImpl;
import nl.ordina.flex.model.service.EmployeeModuleImpl;

import oracle.jbo.client.Configuration;

public class EmployeeService {

private EmployeeModuleImpl am;

public EmployeeService() {
am = (EmployeeModuleImpl)Configuration.createRootApplicationModule("nl.ordina.flex.model.service.EmpoyeeModule", "EmployeeModuleLocal");
}

public List getEmployees() {
List list = new ArrayList();
Employee emp = new Employee();
EmployeesViewImpl empView = am.getEmployeesView1();
empView.executeQuery();
while (empView.hasNext()) {
EmployeesViewRowImpl row = (EmployeesViewRowImpl) empView.next();
list.add(emp.transform(row));
}
return list;
}


public Employee getEmployee(BigDecimal employeeId) {
EmployeesViewImpl view = am.getEmployeesView1();
Employee emp = new Employee();
view.setid(employeeId);
view.executeQuery();
if ( view.hasNext()) {
EmployeesViewRowImpl row = (EmployeesViewRowImpl)view.next();
return emp.transform(row);
} else
return null;
}

public Employee create(Employee employee) {
EmployeesViewImpl view = am.getEmployeesView1();
Employee emp = new Employee();
view.insertRow(emp.transform(employee));
am.getDBTransaction().commit();
return employee;
}

public static String capitalize(String s) {
if (s.length() == 0) return s;
return s.substring(0, 1).toUpperCase() + s.substring(1);
}


public boolean update(Employee employee, List changes) {
EmployeesViewImpl view = am.getEmployeesView1();
view.setid(employee.getEmployeeId());
view.executeQuery();
if ( view.hasNext()) {
EmployeesViewRowImpl row = (EmployeesViewRowImpl)view.next();

for (int i = 0 ; i < changes.size(); i++ ) {
String attribute = capitalize(changes.get(i).toString());
row.setAttribute(attribute,employee.getAttribute(attribute));
}
am.getDBTransaction().commit();
return true;
} else
return false;
}

public boolean delete(Employee employee) {
EmployeesViewImpl view = am.getEmployeesView1();
view.setid(employee.getEmployeeId());
view.executeQuery();
if ( view.hasNext()) {
EmployeesViewRowImpl row = (EmployeesViewRowImpl)view.next();
row.remove();
am.getDBTransaction().commit();
return true;
} else
return false;
}
}

We have to create Assembler class which is used by the LifeCycle server

package nl.ordina.flex.adfbc;

import java.util.List;
import java.util.Collection;
import java.util.Map;

import flex.data.DataSyncException;
import flex.data.assemblers.AbstractAssembler;

import java.math.BigDecimal;

public class EmployeeAssembler extends AbstractAssembler {

public Collection fill(List fillArgs) {
EmployeeService service = new EmployeeService();
return service.getEmployees();
}

public Object getItem(Map identity) {
EmployeeService service = new EmployeeService();
return service.getEmployee(((BigDecimal) identity.get("employeeId")));
}

public void createItem(Object item) {
EmployeeService service = new EmployeeService();
service.create((Employee) item);
}

public void updateItem(Object newVersion, Object prevVersion, List changes) {
EmployeeService service = new EmployeeService();
boolean success = service.update((Employee) newVersion, changes);
if (!success) {
BigDecimal employeeId = ((Employee) newVersion).getEmployeeId();
throw new DataSyncException(service.getEmployee(employeeId), changes);
}
}

public void deleteItem(Object item) {
EmployeeService service = new EmployeeService();
boolean success = service.delete((Employee) item);
if (!success) {
BigDecimal employeeId = ((Employee) item).getEmployeeId();
throw new DataSyncException(service.getEmployee(employeeId), null);
}
}

}

Now the last step in jdeveloper is to add a new data service entry to the lifecycle configuration ( data-management-config.xml located in the flex folder)

<?xml version="1.0" encoding="UTF-8"?>
<service id="data-service"
class="flex.data.DataService">

<adapters>
<adapter-definition id="actionscript" class="flex.data.adapters.ASObjectAdapter" default="true"/>
<adapter-definition id="java-dao" class="flex.data.adapters.JavaAdapter"/>
</adapters>

<default-channels>
<channel ref="my-rtmp"/>
</default-channels>

<destination id="employee">
<adapter ref="java-dao" />
<properties>
<cache-items>false</cache-items>
<use-transactions>false</use-transactions>
<source>nl.ordina.flex.adfbc.EmployeeAssembler</source>
<scope>application</scope>
<metadata>
<identity property="employeeId" type="java.math.BigDecimal" />
</metadata>
<network>
<session-timeout>20</session-timeout>
<paging enabled="false" pageSize="100" />
<throttle-inbound policy="ERROR" max-frequency="500"/>
<throttle-outbound policy="REPLACE" max-frequency="500"/>
</network>
</properties>
</destination>

</service>


Now we can create a Flex lifecycle project ( For more information on creating a flex j2ee project see one of my BlazeDS examples. But here we have to create the employee object too. Create an new Class called Employee

package
{
import flash.display.InteractiveObject;

[Managed]
[RemoteClass(alias="nl.ordina.flex.adfbc.Employee")]

public class Employee
{
public function Employee()
{
}
public var employeeId:int;
public var firstName:String;
public var lastName:String;
public var email:String;
public var phoneNumber:String;
public var hireDate:Date;
public var jobId:String;
public var salary:Number;
public var commissionPct:Number;
public var managerId:int;
public var departmentId:int;
}
}

Add the employee destination to mx:DataService. Import the employee object by adding xmlns="*" to the mx:Application element. Now you can use <Employee/> in Flex.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
width="1155" height="276"
applicationComplete="ds.fill(employeeArray)" >

<mx:ArrayCollection id="employeeArray"/>
<mx:DataService id="ds" destination="employee"/>

<Employee/>

<mx:DataGrid dataProvider="{employeeArray}" editable="true"
width="100%" height="100%"/>

</mx:Application>

Start the flex project twice so you can see the data push in action.

Having JDeveloper 10.1.3.x on your PC

Pas Apicella - Thu, 2008-07-17 08:54
If you have JDeveloper 10.1.3.x on your file system you can take advantage of 2 JAR files even without actually using the IDE. There useful utilities if your using OAS 10.1.3.x. Those are as follows.

$JDEV_HOME\j2ee\home\admin_client.jar - OC4J provides a command-line utility, admin_client.jar, for performing configuration, administration, and deployment tasks on active OC4J instances in an Oracle Application Server clustered environment as well as on a standalone OC4J server. In addition, you can use admin_client.jar to restart or stop an OC4J instance or group of instances. See this document for more details.

Oracle® Containers for J2EE Configuration and Administration Guide
10g (10.1.3.1.0)
Part Number B28950-01
http://download-uk.oracle.com/docs/cd/B31017_01/web.1013/b28950/adminclient.htm#BABCCJEC

$JDEV_HOME\webservices\lib\wsa.jar - The WebServicesAssembler tool assists in assembling Oracle Application Server Web Services. It enables you to generate the artifacts required to develop and deploy Web services, regardless of whether you are creating the service top down or bottom up. The WebServicesAssembler can also be invoked to create Web service client objects based on a WSDL. See this document for more details.

Oracle® Application Server Web Services Developer's Guide
10g (10.1.3.1.0)
Part Number B28974-01
http://download-uk.oracle.com/docs/cd/B31017_01/web.1013/b28974/wsassemble.htm#CHDDBCCA

For both of these utilties use the -help option for more details of what command line options can be used.

Eg:

java -jar D:\jdev\jdevprod\10133\webservices\lib\wsa.jar -help

Note: Stand Alone OC4J has the same JAR files as well.http://feeds.feedburner.com/TheBlasFromPas
Categories: Fusion Middleware

Is AD really the dominant Identity Store out there?

Nishant Kaushik - Wed, 2008-07-16 09:44
James McGovern has challenged my position that applications should not be written to go directly against AD. And he got the backing of Jackson Shaw in this argument. James says: If pretty much every Fortune 500 enterprise has Active Directory,... Nishant Kaushik
Categories: Fusion Middleware

Using Adobe LifeCycle in the embedded OC4J server

Edwin Biemond - Tue, 2008-07-15 14:44
Using Adobe LifeCycle Data Services ES instead of BlazeDS gives you some extra features like security, WSRP portlets, data push or data synchronisation between the connected flex clients and you can generate PDF documents with LifeCycle. With BlazeDS you can only retrieve the data from the application server. With LifeCycle you can also do CRUD operations on this data and the best part is LiveCycle Data Services ES Express has been free for a single CPU server. To use LifeCycle in jdeveloper you have to create a new web project and copy the lib and flex folder of the flex.war to the WEB-INF folder of the jdeveloper web project. Do the same with the web.xml. We only have to add some java options to the run configuration of the web project and we are ready to run it. Add -Doc4j.jmx.security.proxy.off=true -Doc4j.userThreads=true to the java options Now you can run LifeCycle from jdeveloper and please try the Data services features with java , hibernate or SQL adapter.

Enterprise 2.0: What It Is, and How You'll Fail

Bex Huff - Tue, 2008-07-15 14:29

A few days ago Justin asked me if I would like to give a presentation at Oracle's Enterprise 2.0 Bootcamp on July 28th... I said sure, but only if I get to be controversial.

Hopefully this topic will be controversial enough!

I've heard a lot of buzz about Enterprise 2.0 lately... and lots of Enterprise Content Management folks (including Newton, Pie, and Billy) still seem to be frustrated by the general lack of a coherent definition of what exactly is Enterprise 2.0? Frankly, I think the very act of defining Enterprise 2.0 defeats the whole purpose, but I appreciate that some people need guidance...

The world is filled with "thought leaders" trying to railroad people into a narrow definition that is properly aligned with their own technology and ego... Some say E 2.0 is just Web 2.0 for the enterprise. Some say its emerging enterprise architectures (SOA, ESB, CEP, IdM) that make services easier to govern and re-use. Others -- like the lame-os at Wikipedia -- say its nothing more than enterprise social software. Others say its just the Knowledge Management Beast rearing its ugly head yet again...

triple ish on that last one...

In my upcoming book, I spend a chapter on how Enterprise Content Management fits in with Enterprise 2.0... and after swimming in blogs for the past year I think I have synthesized an approximate definition that might make everybody happy:

Enterprise 2.0 is an emerging social and technical movement towards helping your business practices evolve. At its heart, its goals are to empower the right kind of change by connecting decision makers to information, to services and to people.

Swish! Leave a comment and tell me what you think... Hot or not?

Its vital to understand that E 2.0 is still a moving target... we know that the enterprise is changing radically, but we don't have enough hard data to say what its changing into. However, I feel its just the latest leap in the neverending goal to make information and services more re-usable.

As an added twist, E 2.0 also has at its core the goal of connecting people with each other in order to discover the tremendous value that exists outside "the process." If the purpose of process is efficiency, then why do so many people in enterprises complain that their process is horribly inefficient? It might be because your process just plain sucks, or it might be because the process is keeping you from changing something that has drastic side-effects outside your view of the company. The point is not to mock or destroy "the process," but to help processes evolve at the optimal rate. This is not possible unless all decision makers can see first-hand how their changes negatively affect other departments. This cannot be done with metrics alone: you need friendly hallway conversations between people who normally would hate each other.

Unfortunately, after coming up with that definition I was staring point blank at something a little unsettling... If people focus on the wrong things, Enterprise 2.0 will FAIL HORRIBLY the same way Knowledge Management FAILED HORRIBLY! For those who forget, Knowledge Management was some snake oil sold 20 years ago saying that access to information was the #1 problem... its not. The problem is access to the right information at the right time in the right format. My industry -- Enterprise Content Management -- emerged from the ashes of Knowledge Management, trying to implement the few good ideas that it offered.

So... how did Knowledge Management fail? What implications does this have for the failure of Enterprise 2.0? I'm no psychic, but I anticipate that people might make similar mistakes... it all boils down to one problem: you're probably focussing on the wrong thing! How could you fail? Here's five ways:

read more

Categories: Fusion Middleware

The Lotus Notes "But Bull Duck"

Bex Huff - Mon, 2008-07-14 15:12

After yesterday's post on how the best analogy for software design is gene splicing, Michelle pointed me to perhaps one of the saddest marketing ideas ever... The Lotus Notes "But Bull Duck", brought to you by the kind folks at IBM.

I am NOT making this up.

For some reason that I can only attribute to a prolonged lack of fiber, the Lotus folks at IBM decided to put together an online ad campaign about how wonderful Lotus Notes 8 is... Hosted at createsimplicity.com, it allows you to design your own unholy cross-breeds of different animals, and save them to your desktop... each has a different name when you download it. My favorite? The "But Bull Duck".

Apparently the new motto is unify and simplify.

Ummmm... I'm all for unification and simplicity... and I do appreciate the idea that the best analogy for software design is gene splicing... but comparing Lotus Notes to the "But Bull Duck" might not be the best way to get new customers... nor is it the best way to demonstrate to your existing customer base that its time to upgrade. In all likelihood, the "But Bull Duck" will make them think your software is awkward and bizarre.

Viral marketing, or truth in advertising? You choose.

read more

Categories: Fusion Middleware

Convergence of Content And Data

Billy Cripe - Mon, 2008-07-14 11:51
Someone recently asked if we see a convergence between structured and unstructured information - data and content. I believe there is a convergence going on. I think that as unstructured information (content) becomes increasingly transportable (think XML) and reference-able... billy.cripe http://blogs.oracle.com/fusionecm
Categories: Fusion Middleware

Convergence of Content And Data

Billy Cripe - Mon, 2008-07-14 11:51
Someone recently asked if we see a convergence between structured and unstructured information - data and content. I believe there is a convergence going on. I think that as unstructured information (content) becomes increasingly transportable (think XML) and reference-able (think... billy.cripe http://blogs.oracle.com/fusionecm
Categories: Fusion Middleware

SOA success - value over technology

Steve Jones - Mon, 2008-07-14 02:06
There have been a bunch of articles around recently on SOA and judging the success but it was this one at HBR that best sums up the business view of what good looks like. Entitled Investing in the IT That Makes a Competitive Difference its all about companies being smart in the application of technology and choosing the areas where it drives differentiation. One of the bits I've gone on about
Categories: Fusion Middleware

Delving deeper into Relationship-based RBAC

Nishant Kaushik - Fri, 2008-07-11 16:04
Ian Glazer thinks that I have opened Pandora's box by talking about the need to bring context and intent into the area of RBAC by using relationships (one of many ways to express context). I think it's a topic ripe... Nishant Kaushik
Categories: Fusion Middleware

I hate technology, I love solutions

Steve Jones - Fri, 2008-07-11 09:31
I've begun to realise something recently, I don't like technology. I love working in IT but its never the technology bits that get me excited, its always what you can do with them this is why I loathe discussions on "X is better than Y" as its really about what can you do with X and Y. Most of the time you can do the same thing, but maybe one of them makes it easier to reach the end goal.
Categories: Fusion Middleware

Using EJB in Flex with blazeds

Edwin Biemond - Fri, 2008-07-11 08:27
This blog explains how you can use ejb in Adobe Flex with blazeds. First thing I did is creating a application with the jsf, ejb template.

In the model project we can create a new entity bean. I use the CMP entity bean from tables.


For the EJB version I use Enterprise JavaBeans 2.1 option. The Oracle table I will use in this entity bean is the employee table of the HR schema.

Now we can create a Session Bean
If we look at the properties of the session bean we see the retrieveAllEmployees method. We will use this to display all the employees in flex.

We are ready to add the blazeds libraries to the viewcontroller project. Because we want to use EJB, we have to download an extra library. Here is the link of the ejb library which is made by Ryan J. Norris. Add also this library to the viewcontroller project.
Because we use ejb we have to add the embedded oc4j client and j2ee library to viewcontroller project.


Now we can configure blazeds. We have to create two files (remoting-config.xml and services-config.xml ) in WEB-INF/flex/ folder
Here is the remoting-config.xml file. In this file we define a destination with the name of the session bean in the model project.


<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service" class="flex.messaging.services.RemotingService">
<adapters>
<adapter-definition id="java-object"
class="flex.messaging.services.remoting.adapters.JavaAdapter"
default="true"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="EmployeeEJB">
<properties>
<factory>ejb</factory>
<source>SessionEJB</source>
</properties>
</destination>
</service>

Here is the services-config.xml. In this file we define the ejb factory in my case I have to use com.adobe.ac.ejb.EJBFactory for ejb3 we have to use com.adobe.ac.ejb.EJB3Factory as factory class.

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="remoting-config.xml"/>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
</services>
<factories>
<factory id="ejb" class="com.adobe.ac.ejb.EJBFactory" />
</factories>
<channels>
<channel-definition id="my-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition>
</channels>

<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Error">
<properties>
<prefix>[Flex] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
</target>
</logging>
</services-config>

Add the blazeds servlet to the web.xml

<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>

The last step in jdeveloper is to add -Doc4j.jmx.security.proxy.off=true to the run options of the viewcontroller project.

Let's open Flex builder 3 and create a new project.

We have to select j2ee server technology.

The second step is to add the webapp url's.
The mxml is very simple. First we add a remoteobject, then we are calling theretrieveAllEmployees method when the application is loaded and at last we display the result in a datagrid.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="1155" height="206.21213">
<mx:applicationComplete>
srv.retrieveAllEmployees()
</mx:applicationComplete>

<mx:RemoteObject id="srv" showBusyCursor="true"
destination="EmployeeEJB"/>
<mx:DataGrid width="1104.6212"
dataProvider="{srv.retrieveAllEmployees.lastResult}"
height="140.98485"/>

</mx:Application>

Here the result. That's all.