This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes portability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "portability" Watch "portability" New topic
Author

portability

Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Does anyone have experience that they would like share about porting a J2EE application or significant bean from WebSphere to another J2EE server? or from? Did you find that there were proprietary features that made it more difficult than if those features were avoided?
Thanks in advance!


Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

If you use vendor specific feature it is quite natural to be in trouble during porting to different server. If the new server supports the feature the portability will be easy.


Groovy
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
BTW, it's usually the other way around. WebSphere is RABID about adherance to the J2EE spec. In fact we find that in ports to WebSphere we encounter problems because the other servers aren't as spec-adherent as WebSphere.
The moral -- if you write to WebSphere, it'll usually run very easily on other servers.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Originally posted by Kyle Brown:
... if you write to WebSphere, it'll usually run very easily on other servers...

Thanks! This is a very useful piece of information. It would also be interesting to me to know if there are some features that Websphere has that are somewhat specific to Websphere. For example, there might be some extensions to the deployment descriptor, or method of deployment, or monitoring and administration. So far, it sounds like the answer is not.
[ January 23, 2004: Message edited by: john prieur ]
Vijay S. Rathore
Ranch Hand

Joined: Oct 29, 2001
Posts: 449
Hi Kyle,

BTW, it's usually the other way around. WebSphere is RABID about adherance to the J2EE spec. In fact we find that in ports to WebSphere we encounter problems because the other servers aren't as spec-adherent as WebSphere.
The moral -- if you write to WebSphere, it'll usually run very easily on other servers.
Kyle

First of all, what do you mean by RABID?
Second, any comment about this Redbook excerpt:

The EJB 2.0 specification does not support inheritance. However, IBM products, such as VisualAge for Java, WebSphere Application Server, and the Application Developer, provide support for inheritance structures of entity EJBs.
.......

Redbook 246819, Page 447.




SCJP, SCJD, SCWCD1.4, IBM486, IBM484, IBM 483, IBM 287, IBM141, IBM Certified Enterprise Developer - WebSphere Studio, V5.0
Author of IBM 287 Simulator Exam
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

Kyle,
Doesn't WSAD generate some ibm-*.xmi files in addition to the EJB deployment descriptor? I imagine these would be different if porting to a different app server.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by Jeanne Boyarsky:
Kyle,
Doesn't WSAD generate some ibm-*.xmi files in addition to the EJB deployment descriptor? I imagine these would be different if porting to a different app server.


Jeanne, all application server vendor have additional configuration files that go beyond the J2EE specs. For instance, WebLogic requires a weblogic-ejb-jar.xml similar to our ibm-ejb-jar-ext.xmi file. Both vendors require them for the same reason. However, this is configuration, not code -- it doesn't effect the portability of your code.
Kyle
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by Vijay S Rathore:
Hi Kyle,

BTW, it's usually the other way around. WebSphere is RABID about adherance to the J2EE spec. In fact we find that in ports to WebSphere we encounter problems because the other servers aren't as spec-adherent as WebSphere.
The moral -- if you write to WebSphere, it'll usually run very easily on other servers.
Kyle

First of all, what do you mean by RABID?

I mean rabid as in foaming at the mouth insane over adherence to the J2EE specification. Every day in my job we come across porting jobs where a customer tells us "WebSphere is broken -- we did XXX in JBoss or WebLogic and it worked, but it doesn't work in WebSphere!" At which point, we can point the customer to the chapter and verse in the EJB, Servlet, or J2EE specification where it tells exactly what the server is SUPPOSED to do (and which WebSphere invariably does) and which the other vendor's containers do not.

Second, any comment about this Redbook excerpt:

The EJB 2.0 specification does not support inheritance. However, IBM products, such as VisualAge for Java, WebSphere Application Server, and the Application Developer, provide support for inheritance structures of entity EJBs.
.......

Redbook 246819, Page 447.




Sure, WebSphere supports some proprietary extensions to the EJB specification. We explicitly tell you in the InfoCenter documentation, in the redbooks, and even in books like mine that if you use these extensions your code will not be portable. For some customers that's not a concern.
Kyle
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Hi all,
I always belive that, when we need to change the server, from 1 to another 1, we need to put a lot of efforts for this action, even for Java!
This is because, for example, if we use connection pool, the setting for different servers differ, and thus, once we changed the server, many issues encountered.
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Originally posted by Kyle Brown:
Sure, WebSphere supports some proprietary extensions to the EJB specification. We explicitly tell you ... Kyle

I am very pleased with these answers (and all the controversy we provoked ).
Regarding your earlier point, ...this is configuration, not code -- it doesn't effect the portability of your code..."
This is good to know. But sometimes the "configuring" process is very burdensome (I've ported apps between AIX & Sun/Linux and other systems, and even there it was a b ). I guess I'll have to read your book and work with WebSphere in order to reach my own conclusions. Even though WebSphere and others can be used without recourse to their non-EJB2-complient features, I find that such products usually "lead you by the hand" to use their special features and make their product "easier" to use (with the later difficulty extricating your product).
Cheers!
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
The remark in Redbook that Vijay aptly pointed out seems to be wrong:
Originally posted by Kyle Brown:
...
The EJB 2.0 specification does not support inheritance. However, IBM products, ...
Redbook 246819, Page 447.

However, this is contradicted:
EJB2.0 Spec: " The session bean class may have superclasses and/or superinterfaces." p95
...
"The entity bean class may have superclasses and/or superinterfaces." p191.
So, maybe the IBM product developers thought they were providing something beyond the spec. But the other compliant products would support bean inheritance as well.
There is one thing about Entity inheritance with relationships that can be a limitation. I think this is described in Mastering EJB...
If you have CMR fields in the superclass, and other CMR fields in the derived class, you will probably have trouble if you use the superclass as an entity as well as its sub (derived) Entity classes. It leads to illogical situations if you find, select, or update. Who owns the pk? etc. I imagine that even WebSphere does not solve this aspect of the problem.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Actually, the Developers (and my co-author Dan was one of the primary developers!) knew exactly what they were doing. In fact, in our book we quote chapter and verse of the EJB spec to show what is and is now allowable.
Kyle
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Kyle,
Thank you. I don't doubt your expertise. But how do you explain the contradiction in which you (or the Redbook) says...
The EJB 2.0 specification does not support inheritance. However, IBM products, ...
Redbook 246819, Page 447

... while the EJB2.o spec says it does support inheritance?
What are those biblical chapter-and-verses in your book so I can go look?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by john prieur:
Kyle,
Thank you. I don't doubt your expertise. But how do you explain the contradiction in which you (or the Redbook) says...

... while the EJB2.o spec says it does support inheritance?
What are those biblical chapter-and-verses in your book so I can go look?

I can't explain why the redbook says what it does. The authors were probably just trying to be as succinct as possible in stating the truth that the EJB spec doesn't describe component-level inheritance, and made a slightly overly-broad statement.
As for our chapter and verse, in Chapter 25, section 25.11 we quote from the relevant sections of the EJB 2.0 specification (spec page 194, I believe and the Entity bean scenario in Chapter 15 of the spec also).
Kyle
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by john prieur:
The remark in Redbook that Vijay aptly pointed out seems to be wrong:

However, this is contradicted:
EJB2.0 Spec: " The session bean class may have superclasses and/or superinterfaces." p95
...
"The entity bean class may have superclasses and/or superinterfaces." p191.
So, maybe the IBM product developers thought they were providing something beyond the spec. But the other compliant products would support bean inheritance as well.
There is one thing about Entity inheritance with relationships that can be a limitation. I think this is described in Mastering EJB...
If you have CMR fields in the superclass, and other CMR fields in the derived class, you will probably have trouble if you use the superclass as an entity as well as its sub (derived) Entity classes. It leads to illogical situations if you find, select, or update. Who owns the pk? etc. I imagine that even WebSphere does not solve this aspect of the problem.


Actually I just caught your last part of the question. While Dan could handle this more completely, I'm next to certain we actually DO handle this situation of handling who owns the PK in situations where there are CMR's. Hopefully Dan will chime in...
Kyle
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Originally posted by Kyle Brown:
...we actually DO handle this situation of handling who owns the PK in situations where there are CMR's...

Wow! That would be something to see. (And thanks again for the replies.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: portability
 
Similar Threads
J2EE Compliant application
Pro Spring Integration
Passed IBM 158- Websphere [68%] !!!
What about Reflection and JNI on CLDC 1.1.
How to use J2EE