Advice on Migrating J2EE module to NetKernel

Poster Content
nk4um Administrator
Posts: 607
September 28, 2005 05:05
I have a set of interfaces and implementation classes that contain business logic that I want to expose as a web service. These classes are deployed and are running in my app server container and are used in an existing web application. The business classes use the database connection pooling provided by the application server datasource. Can I place my jar files into the NetKernel web app and have them use the application server resources?


The short answer is no. NetKernel is not a J2EE app server. NetKernel can run inside an app server as a servlet in order to leverage container functionality such as HTTP and database connections. However NetKernel hosts NetKernel modules, these are significantly different from WAR files because they operate on a fundamentally different premise - that of a virtualized URI address space. To try and acheive compatibility would be to miss the motivation for the NetKernel!

We have clients who see benefit developing new functionality on NetKernel but who need to integrate existing J2EE code. By deploying them on a common container and then using either HTTP or platform specific methods (JMX on JBoss) they achieve integration.

Can someone point me to some better examples about how to integrate NetKernel with an existing real world J2EE application? Right now I''m having trouble getting the full picture.


We have a some new case studies in the pipeline. However at the moment I cannot publically disclose a number of interesting projects that are using NetKernel. If you contact 1060 directly then, under non-disclose, we can arrange a conversation with a client doing something similar to what you require.

Cheers, Tony
Like · Post Reply
nk4um User
Posts: 1
September 27, 2005 13:51
I think I get it... then I don''t...

I have a set of interfaces and implementation classes that contain business logic that I want to expose as a web service. These classes are deployed and are running in my app server container and are used in an existing web application. The business classes use the database connection pooling provided by the application server datasource. Can I place my jar files into the NetKernel web app and have them use the application server resources?

Can someone point me to some better examples about how to integrate NetKernel with an existing real world J2EE application? Right now I''m having trouble getting the full picture.

-matt
Like · Post Reply
nk4um Administrator
Posts: 607
April 20, 2005 13:37A couple of approaches to consider...
Hi Jason,

Yes you''re right about bugxter and blogxter, they are examples of how far you can go developing with a pure XML approach. As we have moved on we have realised that scripting languages (like beanshell and groovy) are often a better way to fill in some of the algorithmic detail in pipelines. The Forum application is an example of this (which you can download from the mirrors.)

Now to your problem:

NetKernel will be a good solution to layering webservices over existing J2EE functionality particularly when the existing functionality presents predominantly XML. NetKernel will handle all the WSDL, XSD and SOAP processing.

If you run NetKernel as a servlet within JBoss then your existing code should be able to leverage JTA, connection pooling, JNDI etc from JBoss. Take a look at the servlet guide to see how to deploy NetKernel inside a servlet:
http://docs.1060.org/docs/2.0.2/book/userguide/doc_guide_servlet.html

If you create a new module (maybe using the wizard), then drop all your app specific jars into the lib directory and put your source tree in the root of the module.

Then take a look at the workbench module as an example of a easy way to map external URIs to scripts within your module. These scripts will contain the code you write to generate present the web service interface and access the underlying functionality of your app. The web service examples show how this can be done:
http://docs.1060.org/docs/2.0.2/book/declarative/doc_SOAP_trailmap.html

An alternative to this approach is to host your existing functionality on an app server direct (do you have a servlet interface currently?) Then have the web service adaption layer in NetKernel communicate to this servlet via HTTP using the new client HTTP module based on Apache HTTP Client library.

Hope this helpful,
Tony
Like · Post Reply
nk4um User
Posts: 3
April 19, 2005 20:49Advice on Migrating J2EE module to NetKernel
I''m trying to understand how to employ NetKernel with some existing Java J2EE applications.  I''ve sort of poked around bugxter and blogxter and I see they are nearly 100% DPML implementations. 

What I''m interested in is how I could migrate an existing Hibernate-based class library to NetKernel as a module.  So basically what I have now is a set of JAR files (hibernate, my classes, whatever).  I want to put a webservice front-end on it.  So let''s say I''ve got my XSD''s and WSDL''s all worked out, can you give me your view of how I would migrate this to NetKernel.

I have no Entity or Session beans, I''m just using JTA, connection pooling, JNDI, that sort of thing.  At the moment I don''t really care if this is standalone Netkernel, or the servlet within JBoss.

Thanks,

- Jason



Like · Post Reply