• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

are EJBs portable?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean, is the implementation the same on all servers? Weblogic, WebSphere, JBoss, etc.? Write once, deply anywhere...
I'm just starting to look at EJBs, and if they're server specific, I need to decide who's server to study...
Thanks,
Bret
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes they are make EAR once deploy anywhere.If you are short of money then you can try the best free source app server JBoss,or there are others like Blazix,OpenEJB.If you have got moolah then go for WebSphere or WebLogic.
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, One thing is whether the app server is compliant and another is how they implement the specification API's. I'd say the implementation is not the same in all app servers, otherwise there will be no competency. One CMP engine can be better in app server X than app server Y. But, they all must implement and follow the same contract stated in the EJB specification, for example, so if you can migrate your EJB's from app server X to app server Y with minimal problems.
I'd say that if you stick to the specification you shouldn't have problems with portability, as long as the application servers are specifications-compliant.
But, many application servers add extra functionality that is beyond the J2EE specification. For instance, as far as I know, the ejb specification doesn't mandate a single way to generate primary keys. There are many patterns that explains how to generate these keys (UUID), but there are also app servers that provide that functionality. So, if you're using that "extra" functionality and you were to migrate your EAR file to another app server that does not support that extra functionality, you will run into trouble.
Application servers also used proprietary xml configuration file (jboss.xml, weblogic.xml -not sure about this one-), etc. So you will eventually have to do minor changes to your descriptor. It's not as easy as moving the EAR file to another app server.
My $0.02
[ August 11, 2003: Message edited by: Andres Gonzalez ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One specific problem-cause when migrating J2EE apps can be the classloader hierarchy, which is not dictated by the specifications. If you're using some class visibility hacks, you could be encountering a major refactoring...
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a plan to include automatic primary key generation as a part od future spec?
 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most IDEs nowadays support auto-generation of deployment descriptors for different servers. If your IDE does not support it; try Xdoclet
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there a plan to include automatic primary key generation as a part od future spec?


It is part of the spec. The container is required to be able to generate unique primary keys using an Object (EJB 2.0 spec, 10.8.3).
Or did you mean a standard facility for generating primary keys for the application code's disposal?
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The second one.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All major EJB Containers support automatic primary key generation, however this support is not mandated by the specification. This is probably partially due to the fact that retrieving auto-generated keys was not supported by JDBC before version 3.0. Now that future versions of the J2EE spec will be based on J2SE 1.4 (which contains JDBC 3.0), I would think that support for automatic primary key generation would be made standard.
Unfortunately, it is not a part of EJB 2.1. So the earliest that we would probably see this feature is in EJB 3.0.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

So the earliest that we would probably see this feature is in EJB 3.0.


For the interested, theserverside.com has a thread going on about what should be included in 3.0...
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB 2.1 is not yet out but these guys have started to work on 3.0 spce. Great
 
Put a gun against his head, pulled my trigger, now he's dead, that tiny ad sure bled
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic