• 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
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Defining a class in a package

 
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From Maikali Zaikin's notes:

Maikalai Zaikin wrote:The enterprise bean must not attempt to define a class in a package. This function is reserved for the EJB container. Allowing the enterprise bean to perform this function would create a security hole



What is this?
Couldn't we define a package statement for a bean?



Is this illegal?


 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is taken straight from the spec : 21.1.2 Programming Restrictions.
I think this point has something to do with java.lang.ClassLoader's defineClass and definePackage methods.
 
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. What you did is perfectly valid. I think the rule you quote has sth to do with dynamic class loading and the ClassLoader.defineClass() method.
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to Christophe,

Raf Szczypiorski wrote:Hi. What you did is perfectly valid. I think the rule you quote has sth to do with dynamic class loading and the ClassLoader.defineClass() method.


What is "dynamic class loading"? Did you mean java reflection?
reply
    Bookmark Topic Watch Topic
  • New Topic