This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Defining a class in a package

 
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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?
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic