advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Tutorials : Add Rich Media Content to Your J2EE Apps with Enterprise Media Beans:

Media Entity Beans

Media Foundation beans provide basic and lightweight media functionality. However, but if they're used in a business-intensive environment where media objects would have to participate in transactions, provide security, or integrate with existing enterprise applications, Media Entity Beans do the job better. Media Entity Beans allow media content to be persisted in data storage, participate in the transactional context of EJBs, and obey the security constraints of EJBs.

An Entity bean called Media Entity EJB represents the Media Entity Bean. Just like an Entity bean that represents a record in the database a Media Entity EJB represents the medium of the media object. The Media Entity Bean exposes the media content of a media object while hiding the persistence mechanism used by the media object. The media object can be persisted as a BLOB, CLOB, or any user-defined data format. The persistence mechanism can be proprietary and still be transparent to the user. This flexibility of the data persistence mechanisms can be useful when large amount of data need to be stored. The data storage can be changed, sized, and optimized without any impact on existing applications.

Media Entity Beans can be used both as container-managed Entity beans and as bean-managed entity beans. Using media beans as Bean-managed entity beans allows the user to map the media information to custom data formats. Media Entity beans share the same security and transactional context of regular Enterprise Java Beans. This reduces the overhead of providing security and transaction support for Media beans. In addition, media beans also support relationships like entity beans, which can be of great use in a large enterprise application.

The relationships in Media Entity Beans can be with existing Entity beans or other Media Entity Beans. These relationships help to model referential integrities like links to external data in non-embedded media objects. Media Entity Beans provide support for analyzing the dependencies between non-embedded objects and their parents and then help to create child media beans for the dependent objects. They also manage the relationships between these objects when one of them is changed. Another type of relationship defined in the pretext of Media Entity Beans is the predecessor/successor relationship between media objects. Apart from these relationships, Media Entity Beans allow for custom relationships between Media Entity Beans.

Roles

All the roles and responsibilities defined in the EJB specification also apply to Enterprise Media Beans. In addition to these responsibilities, Enterprise Media Beans have additional roles.

Media Foundation Bean Providers
The Media Foundation Bean providers are responsible for providing support for media formats and converters used by the media beans. This would usually be a third party vendor who implements the EMB specifications to provide rich content. The provider can choose to support specific media formats as he deems fit for his implementation.

Media Entity Bean Provider
Media Entity Bean providers are responsible for providing support for Media Entity Beans according to the guidelines specified in the Media Entity Beans section of the EMB specification. This includes choosing the right kind of persistence mechanism. The Bean provider can support general persistence mechanisms like databases, content management servers, etc. The providers can also support persistence through their own persistence framework as long as it is able to support any Media Entity Beans created using the EMB specification. The providers also define the kind of persistence management (CMP, CMR, BMP, BMR, etc.) being used in the implementation. Though not mandated through the specification, Bean providers are encouraged to provide support extensions to the EJB deployment descriptor for resource management.

EJB Application Developers
EJB application developers can directly use Media Entity Beans and Media Foundation Beans within their applications. Developers can define relationships between regular entity beans and media beans. Developers can also create custom media beans that provide special media listener implementations to cater to the specific use in an application.

EJB Container Providers
The specification does not ask for EJB container providers in this release but might consider defining a container to manage the resources used by Enterprise Media Beans in the future. As of now, Media Beans use the default EJB container provided by the vendor.

Related Specifications

Java Media Framework
Java already provides a specification called the Java Media Framework for constructing interoperable media players in java. The Java Media Framework defines the process of capturing, processing, and playing back the streaming media. The JMF-based converters and transcoders can perform conversions and transcoding on media objects and make them ready for playback. These converters and transcoders can be modeled as Java beans which can be used as Enterprise media Beans.

Content Management Systems
Content management systems store and manage media data so that they can be effectively retrieved and processed. There are numerous content management vendors like IBM and FileNet that provide customers with proprietary content management solutions. It is impossible for customers to store data in these disparate content management systems to interoperate among each other. The Java Content Repository specification (JSR 170) proposes a unified API for content management systems. EMBs can leverage on this budding API and build J2EE systems that are truly open and interoperable. Similar to how EJBs work with the JDBC API to access the database, EMBs can work with Java Content Repository API to provide rich media content in an enterprise environment.

Perfect Timing

The standards for the media industry are still evolving. Given the future potential of media content on the internet, the industry is bound to see a big surge in rich media content. The EMB specification comes at just the right time—when the industry is trying to consolidate different media formats and come up with a few standard media formats for the internet.

At this point, however, the EMB specification is very rudimentary, with many specifics yet to be defined. As standards evolve, the EMB specification will be adding more features. The success of the specification largely depends on how is is embraced by media vendors and application server vendors.

Future releases of EMBs could have transcoding capabilities to query the client's media abilities and convert media objects on-the-fly to suit particular requirements. Future EMBs might also include built-in indexing and searching capabilities, which would make them more efficiently searchable.

References:
JSR 86 Home Page

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 38
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Mozilla's Ubquity Mashup: For The Masses?
iPhone Users Just Want to Have Fun
Oops! I Fixed the Linux Kernel
Jim Zemlin: The New Center of Linux Gravity
Microsoft's Novell Investment Tops $340M
Fedora 10 Takes Shape
IBM Gives a Mobile Voice to Developers
Inadequate Tools Send Software Down the Drain
USB 3.0 One Step Closer to Reality
Would-Be Linux Contributors May Get a Leg Up

Book Excerpt: Microsoft Expression Blend Unleashed
Develop a Mobile RSS Feed the Easy Way
State of the Semantic Web: Know Where to Look
A 3D Exploration of the HTML Canvas Element
Setting Up and Running Subversion and Tortoise SVN with Visual Studio and .NET
Java/JRuby Developers, Say Open 'Sesame' to the Semantic Web
Interpreting Images with MRDS Services
DevXtra Editors' Blog: Executives Avoiding Cloud Computing in Droves
Q&A with James Reinders on the Intel Parallel Studio Beta Program
The Pros and Cons of Outsourcing Enterprise Emails

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers