Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Programming Restriction

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
According to EJB 2.0 specifications, there are some restrictions when we code EJB.
What is the result when we deploy and run the an application which breaks those rule? Example in our application use ServerSocket or read/write static field...
thanks
daniel
 
Vladas Razas
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB but I believe I can answer that It depends on what rules you break. Breaking most rules makes your code unstable.. Most likely container will throw exception. Maybe some containers will not even let you deploy your beans. Breaking the other rules might make you regret that later (like code becoming inefficient, not scalable etc.).
Best regards
 
Nehul NN
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your code might work in one container but not on other. Rules are made because you can deploy your code to any container provider with min or no change in code.
SCJP1.4
SCWCD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic