Create a file from EJB

How can I create a file using regular java.io.File from a session bean?

Hi,
I hate to tell you this, but according section 18.1.2 in the EJB 1.1 specs, this is not allowed and thus not possible on a correctly implemented EJB container.

Similar Messages

  • FAQ: Creating PDF Files from FrameMaker v.6 & earlier Documents -- Why you should not use "save as PDF"! -- Windows & MacOS Only!

    An issue that has come up over and over again on several FrameMaker and Acrobat/PDF email lists as well on the corresponding Adobe User-to-User forums is that of creation of PDF files. FrameMaker 5.5.6 and 6 have what looks like a convenient feature that is supposed to allow you to create PDF files via simply saving the document as a PDF file. I have gone on record as advising end-users not to use this approach for reliable creation of PDF files from FrameMaker documents under Windows and MacOS with FrameMaker 6 and earlier. Why do I most vociferously offer this advice and why doesn't the problem get fixed? And how SHOULD you create PDF files from FrameMaker?
    GOOD NEWS
    I will start with the good news. The "next major version" of FrameMaker will indeed have "save as PDF" re-implemented in a manner that it will be as reliable as printing to the "Acrobat Distiller" printer instance under Windows or the "Create Adobe PDF" desktop printer under MacOS. I am personally working with the FrameMaker development organization to make sure this really happens and is fully and properly tested and debugged! Furthermore, this next major revision of FrameMaker, unlike FrameMaker 6, will come with a Distiller installer that will properly install the "Acrobat Distiller" printer instance under Windows and the "Create Adobe PDF" desktop printer on the Macintosh (of course assuring that the latest PostScript driver is also automatically and correctly installed).
    DON'T USE "SAVE AS PDF"
    But what's wrong with "save as PDF" as currently implemented?
    The following are some of the SYMPTOMS reported over the last few years by FrameMaker users that were traced back to use of "save as PDF" under FrameMaker:
    (1) No PDF file is produced at all, possibly with a log file showing not-readily apparent PostScript errors during distillation.
    (2) The PDF file "loses" color in images. All or some images (raster, bitmap images, NOT vector artwork) appear in the PDF file in grayscale.
    (3) The resultant PDF file is on the wrong paper size, i.e., the document's logical page size does not match the output page size as seen in Acrobat or Acrobat Reader.
    (4) Some or all text in the resultant PDF file is blotchy looking or overly bold.
    (5) Some or all text in the resultant PDF file cannot be searched or indexed.
    (6) Some or all text in the resultant PDF file appears in Courier or in some other substitution font.
    (7) Interword or intercharacter spacing is a bit irregular in the resultant PDF file.
    (8) Content is missing in the margin areas of the page, i.e. you cannot do full-page bleeds.
    (9) Some or all page content is missing (other than margin areas).
    (10) Relatively inefficient PDF is generated.
    If this list by itself isn't enough for you, please note that some of these symptoms are very subtle and may escape attention when the PDF is first viewed or printed. Oftimes, it is when one attempts to manipulate the PDF file in Acrobat or repurpose its content or even view or print on a system other than the one on which the PDF file was created, that some of these symptoms make themselves obnoxiously visible (or invisible in some cases I won't make any bad jokes here about graphic examples!).
    It is important to understand that FrameMaker does NOT have its own native ability to create PDF. Any and all PDF created from FrameMaker documents is actually done by creating PostScript via the PostScript driver and having the Acrobat Distiller create PDF from that PostScript. The only exception to this is creation of PDF via the Acrobat PDFWriter driver, which is likewise not recommended (see below).
    In order for "save as PDF" to work correctly, FrameMaker must do the equivalent of calling Printer Setup and selecting the "Acrobat Distiller" printer instance under Windows or the "Create Adobe PDF" desktop printer under MacOS followed by setting the driver's options correctly for paper size, page range, etc., followed by sending the proper commands to the driver to create PostScript.
    Contrary to popular belief, PostScript as generated by the Windows and MacOS PostScript drivers is VERY device-dependent. The information in the PPD file associated with a printer driver instance provides critical parameters for generation of PostScript including:
    Whether the printer supports color (Acrobat Distiller does)
    What PostScript language level is supported (Acrobat Distiller 4.x and Acrobat Distiller 5.x are both PostScript language level 3)
    Whether native TrueType support is available (Acrobat supports native TrueType as Type 42 fonts)
    Available binary communications (Acrobat Distiller supports pure binary and ASCII, but NOT TCP, TBCP, or PJL)
    Resident fonts (Acrobat Distiller doesn't really have resident fonts)
    Available paper sizes and custom paper size availability (Acrobat Distiller supports a wide range of predefined sizes and continually variable "custom" sizes up to 200" by 200")
    Margins / printable areas (for PDF and the Acrobat Distiller, there are no margins in which imaging is not permitted)
    Device resolution (Acrobat Distiller can be set to any value from 72 to 4000 dpi; as a convenience, the Acrobat Distiller PPD provides a series of values for use by the driver. Since there is no inherent "resolution" of a PDF file, this parameter is used only for purposes of allowing PostScript programs that query for such a value to be satisfied and for the driver to be able to communicate this value to the operating system and/or application as required.)
    Paper handling (totally irrelevant to Acrobat Distiller if input or output tray selection via "setpagedevice" is found in the PostScript stream, it is ignored by Acrobat Distiller)
    Thus, if the wrong printer driver instance is selected (i.e., it isn't associated with the Acrobat Distiller PPD file) or that driver instance is improperly configured, improper PostScript will result and one or more of the symptoms described above can occur. As currently implemented, FrameMaker depending upon version will not necessarily choose the correct printer driver instance and/or correctly parameterize the print job via driver setup options. In fact, FrameMaker 5,5,6 might even try to generate PDF via calling a PCL driver, FAX driver, or even a non-PostScript inkjet printer!
    DON'T USE PDFWRITER
    The Acrobat PDFWriter is a relic of older versions of Acrobat. In fact, it is no longer installed by default in the "easy install" or the "typical install" of Acrobat 5. It hasn't really be updated since Acrobat 3 and only supports PDF 1.2. It is a GDI (Windows) / QuickDraw (MacOS) driver that directly generates PDF without any intermediary PostScript. Since it is not a PostScript printer driver, applications cannot pass through EPS graphics and/or PDFMark information (used for a wide variety of purposes by FrameMaker). For EPS graphics, most applications will send the low resolution TIFF (or PICT) EPS header in lieu of the PostScript text, if they send anything at all, to the driver. Forget about links, structure, or any other PDF "goodies." Expect that PDFWriter will fully "bite the dust" in the next major version of Acrobat.
    SO HOW DO I GENERATE PDF FILES FROM FRAMEMAKER 6 & EARLIER?
    The ONLY method that is really reliable for producing PDF files with FrameMaker 6 and earlier requires the generation of PostScript via a properly set printer driver instance associated with the Acrobat Distiller PPD and distillation of the resultant PostScript by Acrobat Distiller.
    Case 1: FrameMaker and the Full Acrobat 4.05 or Acrobat 5.0x Products
    PDF file from a "chapter" -- print directly to the Acrobat Distiller printer instance (Windows) or the Create Adobe PDF desktop printer (MacOS) already installed by Acrobat. If you check the "Acrobat data" option, then make sure to UNcheck the "print to file" option that gets set at the same time. As a result, the driver will automatically send the generated PostScript to the Distiller for you and delete the intermediate PostScript when done.
    PDF file from a "book" -- print directly to the Acrobat Distiller printer instance with the "print to file" option checked (Windows) or the Virtual Printer desktop printer (MacOS) associated with the Distiller PPD (see details below under Case 2/MacOS). You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    In both the above sub-cases, the default driver options generally will be OK, but check on paper size and communication protocol (Use pure binary, not ASCII, for optimal performance AND no CTRL-D characters under Windows. Make sure to set Level 3 only and Binary under MacOS. Font inclusion "All" for Acrobat 4.05 and "None" for Acrobat 5 under MacOS.). With Acrobat 4.05, make sure you preset the Distiller to use the joboptions you want. With Acrobat 5, you can set this on a job-by-job basis via the driver printer setup interface (or print dialog on MacOS).
    Case 2: FrameMaker 6 and the Bundled Acrobat 4.05 Distiller
    Windows -- Create a new printer driver instance using the latest version of the Adobe Universal PostScript Driver Installer, downloadable from Adobe's web site AND the Acrobat Distiller PPD file (located in the XTRAS subdirectory of the Distiller directory). This driver instance should be set to print to the local port named "FILE:". Name this driver instance as "Acrobat Distiller". The default driver options generally will be OK, but check on paper size and communication protocol (use pure binary, not ASCII, for optimal performance AND no CTRL-D characters). Make sure you preset the Distiller to use the joboptions you want. Print directly to this Acrobat Distiller printer instance. Make sure that the "print to file" option is checked. You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    MacOS -- Install the latest version of AdobePS 8.7.x, downloadable from Adobe's web site. In FrameMaker, go to Page Setup and select the "Virtual Printer" and go to the "Virtual Printer" window pane. Select the Acrobat Distiller PPD file (located in the XTRAS subfolder of the Distiller folder). Print directly to the "Virtual Printer" (Make sure to set Level 3 only, Binary, and font inclusion "All".). Make sure you preset the Distiller to use the joboptions you want. You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    Case 3: Acrobat 3
    Acrobat 3 is not officially supported for the latest OS versions and I personally would no longer recommend its use for generation of PDF files given that Acrobat 5.0.5 is the current version of Acrobat.
    - Dov

    You're asking a lot of ancient Acrobat to work with an Office that never existed when it was made. "Just updated my office suite" is a massive change, and Window 8 didn't exist at that time either...

  • Howto make created folders/ files from one teacher, read only for other teachers?

    Hello there,
    as an admin @ school I was wondering how to make created folders/ files from one teacher, read only for other teachers?
     - In a 2008domain, created a group "teachers"
     - created a folder "teacher data" where all teachers have read/write permissions
    ideal,a teacher who make's a folder in "teacher data" should be the only oen who is able to add file's to that folder and dele that folder or files. Other teachers may be able to read the content of the folder.
    Is this possible to set up and how?
    many thanks.
    Nico.
    rds

    Hi Nico,
    You could set the permissions below to resolve the issue:
    For the root folder "teacher data": give the full control permission to CREATOR OWNER – "Subfolders and files only" and give the read/write permissions to the group "teachers"– "This folder only".
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • How to create xml file from original

    I have this complicated xml and I want to search through it and make a new xml with only element I find that match. what is the best way to do this? the file
    is about 6mb and I want to read the whole file easily..should i load to database table and create a file from table? I have found issues reading the file..
    - <ArrayOfJobClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <JobClass>
    - <Triggers>
    - <TriggerClass>
    <ExpireActionType>Delete</ExpireActionType>
    <ExpireType>DateTime</ExpireType>
    <TriggerType>TimeType</TriggerType>
    - <TTime>
    <TimeTriggerType>Custom</TimeTriggerType>
    <IntervalType>Daily</IntervalType>
    <SpecificType>Days</SpecificType>
    <FirstLastType>First</FirstLastType>
    <IntervalValue>1</IntervalValue>
    <FirstLastWeekDay>Monday</FirstLastWeekDay>
    <InitDate>2009-05-04T14:17:05.40625-07:00</InitDate>
    - <IntervalDays>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>

    You can load it in the database in an XMLType table (Object-Relational or Binary XML storage), use XQuery on the XML content and then write back the result to a file.
    Or, you might just use an external processor (XSLT or XQuery).
    If you want to stay in the Oracle world, you can use :
    - For XSLT : $ORACLE_HOME/bin/oraxsl (it's a wrapper for the java XSLT engine)
    - For XQuery : the java XQuery API
    Personally, I sometimes use the Saxon XSLT and XQuery processor, quite efficient.
    Here's a simplistic example with oraxsl utility :
    emp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <emps>
      <emp id="7369">
        <name>SMITH</name>
        <job>CLERK</job>
        <salary>800</salary>
      </emp>
      <emp id="7499">
        <name>ALLEN</name>
        <job>SALESMAN</job>
        <salary>1600</salary>
      </emp>
      <emp id="7521">
        <name>WARD</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>
      <emp id="7566">
        <name>JONES</name>
        <job>MANAGER</job>
        <salary>2975</salary>
      </emp>
      <emp id="7654">
        <name>MARTIN</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>
    </emps>
    emp.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="text()"/>
    <xsl:template match="emps/emp[job='SALESMAN']">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:stylesheet>Applying the transformation to search and extract all "salesmen" :
    D:\ORACLE\test>%ORACLE_HOME%\bin\oraxsl emp.xml emp.xsl result.xml
    D:\ORACLE\test>type result.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <emp id="7499">
        <name>ALLEN</name>
        <job>SALESMAN</job>
        <salary>1600</salary>
      </emp><emp id="7521">
        <name>WARD</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp><emp id="7654">
        <name>MARTIN</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • Can not open JPEG files and can not create JPEG files from other software

    Can not open JPEG files and can not create JPEG files from other software (For example from Solidworks).
    When I try to right click on a JPEG, a notice window appears written: "Windows Explorer has stopped working - Windows is
    checking for a solution to the problem" and then the notice box disapears, the desktop appears and I can continue working.
    From the other side - If I try to save as JPEG a screen of Solidworks (like a view of a part) the Solidworks falls but the JPEG
    is created (I can see its name in the directory I created it).
    I can open the JPEGS with the Paint software if I want but not with the Windows Photo Viewer.
    I have the feeling that the Windows Photo Viewer disapeared from my computer - just a feeling.
    I will appreciate your assistance.
    Avi T. 2014

    Hi,
    Did Windows Photo Viewer option appear when you right click the JPEG file and select open with?
    I would like suggest you use Clean Boot to troubleshoot if there is third-party software conflict:
    How to perform a clean boot in Windows
    http://support.microsoft.com/kb/929135
    Karen Hu
    TechNet Community Support

  • I can't create PDF files from DWF files

    I'm looking for a solution for creating PDF files from DWF files. When I attempt to create a DWF file to PDF, the file has problems being created. Does anyone have a solution to this?

    We are trying to print to pdf format from a dwf (Autodesk Design Review) drawing file.  DWF is autodesk’s version of PDF.  In autocad, you can print to either dwf or pdf.  However, some of the fonts within autocad are not recognized by adobe so the fonts often don’t print properly.  Thus, we print to dwf first, then print again to pdf.
    We operate 2 basically identical computers; the one computer is able to print from dwf to pdf and the other is not.   When I say not able, only part of the drawing actually prints; like it is not able to process the data.  The computer that cannot print from dwf to pdf, can actually print directly to pdf from Autocad.    It just cannot print from dwf to pdf.
    Both computers are running Windows 7, Autocad Architecture 2015, and Adobe acrobat X. 
    Let me know if this is enough information.

  • Can't create PDF file from Browser Window

    Hi, I used to use Acrobat extensively (but not recently) to create PDF files from various websites. Today when I tried to do it from IE and from Chrome I found out that the ability to do that is no longer there.
    I cannot figure out why it disappeared nor how to fix the problem.
    Does anyone have any insight to this?
    I'm using Arobat X, version 10.1.5.
    Karen

    I am clueless as to where to start. Adobe PDF and Adope PDF Conversion Tool Bar are both enabled, but they do not appear. I can, however, print to PDF (thanks for the head's up). My browser of choice is IE9 ... I also have Chrome installed and I can print to PDF from it, too, but do not see any PDF extensions (if that is what Chrome calls them).
    Given that I probably have upgraded IE someplace along the line (it just does it), is there a way to make that installed tool bar appear that you know of? 
    Again, thanks for the PDF printer tip!

  • Acrobat 11 doesn't create pdf. files from doc. files

    I tried to create a pdf. file from a doc. file (Office 2003). Acrobat 11 instead opens a warning message with the following contents (translated from German):
    A high security level has been chosen. Start the application that created the document, activate the dialogue "safety warning", choose "always trust macros from this resource, activate ... from Adobe Systems Inc. (the message aborts there).
    I selected "Extras/Macro/Safety/Safety level" , there I selected "low". The above mentioned message still comes up.
    What do you suggest to do in order to finally create pdf. files from doc. files?
    Additional information: Creating pdf. files from xls. files (Excel), txt. files (Editor) and saving a webpage as a pdf. file all work fine.
    Thanks for your input!

    Although Office 2003 is old compared to Acrobat XI, according to Compatible web browsers and PDFMaker applications it should work, though support has passed end of life.
    So my first test (if it were me) would be to see if PDFMaker works if run in the simplest way (the only way I ever use it, this right click conversion stuff isn't in my worldview). That is, does the Acrobat menu appear in Word and does it work? If it does not work, no other method based on it can work.

  • Can I create pdf files from Outlook 2003 messages with Acrobat XI Standard?

    Can I create pdf files from Outlook 2003 messages with Acrobat XI Standard?

    Yes, Outlook 2003 is compatible with Acrobat XI Standard and you can create PDFs from emails.
    For reference: http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html

  • Problem Creating PDF Files from Excel 2007

    I am running WinXP SP2, Office 2007, and Acrobat v8.1.2. I have an Excel workbook with multiple worksheets. When I was using Excel 2003 I could create a PDF file using five of the six worksheets. Since upgrading to Office 2007 I am unable to create PDF files from Excel. I can create PDF files from Word 2007. When I attempt to use the Acrobat Plug-in to create a PDF I get a message saying the file needs to be saved first. It then attempts to save the file to a strange, somewhat random, file name (e.g. A234G53). When I say OK Excel just hangs and is unresponsive. The way that I can clear it is to stop Excel using Task Manager. I have tried reinstalling Acrobat without successfully solving the problem. Any ideas on how I can diagnose and/or solve the problem?
    Thanks.

    Is your Excel file on a location outside your machine's disk? If so, try copying to local disk.
    Does the Excel file have any protection applied to it? If so, try removing the protection
    If these don't work, can you post a sample file that demonstrates the problem.

  • Creating PDF Files from Microsoft Office | Learn Acrobat X | Adobe TV

    This video explains how to create PDF files from Microsoft Office products including Office 2010 in Acrobat X Std. or Pro.
    http://adobe.ly/w5Vsg9

    I have used Print to PDF from the File Menu in Office many times. Normally it works fine, but for whatever reason, in MS Excel 2010, I have one file that will not Print.
    It allows me to select the Adobe Printer and save location, and when I hit "Print" it shows a dialog box for about 1/2 a second, but no progress meter, and the file isn't created. All other files work fine except this one - there aren't any security measures or special attributes in the file, it just doesn't physically create the PDF.
    Any thoughts on how to resolve? I have tried rebooting both Excel as well as the Laptop several times.

  • Creating INDD file from INX and visa versa

    Hi
    My task is to create a inx file from indd file and that was easy. I just use
    var myDocument = app.open(File(sourceFileName));
    //save INX
    myDocument.exportFile(ExportFormat.INDESIGN_INTERCHANGE, File(destinationFilePath+".inx"));
    but my problem is that I now have a more that one INDD file and one INDB file and client ask me to make INX file from it.
    (I;m just a developer and I never use InDesigner application at all so is it possible? and how?
    and than I have to form INX file create INDD file , text file and all Linking files in Links folder.
    I found a
    var myDocument = app.open(File(sourceFileName));
    myDocument.packageForPrint(myLinkFolder, false, true, false, true, true, true, "", false);
    but problem is that I got only INDD file and for some reason the newly create INND file has a name undifined_1.indd (I found that this is a file name that script foud from INX file ?!?) LInks file is empty.
    Is it possible that he create package and put all eps file there !?!

    I'm a designer not a developer, so I'm not sure I'll be helping but<br />the normal behavior when opening an INX file is creates an untitled<br />.indd file.  This is is typical.  I'm not sure how you would<br />automatically rename back to what it was previously. Have you tried<br />packaging the indd file BEFORE you make the INX file?  Also InDesign<br />has the ability to embed the images in the file or link them to<br />external files. You might check to see if that is done, by checking<br />the links pallet.  Unfortunately I'm not following what you're<br />starting goal and end goal is.  I'll be helpless with the programming<br />end, but any questions regarding how InDesign would typically do it,<br />I'm happy to help with.<br /><br />Rosie<br />Trying to learn scripting by osmosis (tucks her laptop under her pillow)<br /><br />On Wed, Feb 18, 2009 at 4:31 AM, lpastor74 <[email protected]> wrote:<br />> A new discussion was started by lpastor74 in<br /><br />> but problem is that I got only INDD file and for some reason the newly<br />> create INND file has a name undifined_1.indd (I found that this is a file<br />> name that script foud from INX file ?!?) LInks file is empty.<br />><br />> Is it possible that he create package and put all eps file there !?!<br />><br />> ________________________________<br />> View/reply at Creating INDD file from INX and visa versa<br />> Replies by email are OK.<br />> Use the unsubscribe form to cancel your email subscription.<br />><br />>

  • How to get File Reference of a properties file from EJB

    Hi,
    I am using Sun App server 7 with Oracle 9i. I am keeping all my SQL statements in a properties file from which I am loading it while making a database operation from Stateless beans. My problem is I am not able to get the reference of the properties file. Here is the code through which I am getting the SQL statements loaded to a cache.
    String sqlFileName = "SQL.properties";
    sqlCache.load(new FileInputStream(sqlFileName));
    From the cache I am sending the SQL statement depending on the key value. But the problem is I have to keep the SQL.properties file on the App Server config directory of the instance where the server.xml file resides. Otherwise it is not able to find the properties file. But I don't want to put the properties file on the config directory of the server instance. Please help how to get the properties file from the packakge. My file is residing inside a package com.company.sql . Botht the properties file and the class accessing the file are residing in the same package. Please help how to get the reference of the file with out putting the file in the config directory.
    Thanks
    Amit Patnaik

    Just wanted to warn you of the hazards if you read a file from EJB
    So please make sure that these hazards will not affect your application. However the solution suggested to use getResourceStream() concurs with ejbSpec
    This snippet is from suns blueprint on ejb
    Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors?
    Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard.
    Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file.
    Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes.
    Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class.
    Hope this info helps!

Maybe you are looking for

  • Installation of Oracle AS 10g on Red Hat ES 3.0

    Installation of Oracle AS 10g on RedHat ES 3.0 (All issues are cleared and u will b done with no error like Java Configuration Failed and make files errors) Red Hat Enterprise Linux 3 Custom Installation Copy from OTN Note Start Oracle 10g is certifi

  • Just tell us how to get rid of Firefox and return to IE

    I want to un-install Firefox and return to IE. DO NOT LIKE FIREFOX! DON"T WANT TO FIX IT! I just want to get rid of it and be done with it! Do not want to have to re-format and re-install everything but if that's what it takes I will do it!

  • Power Problems- Where's the "Book" in my Powerbook?

    I recently purchased a PowerBook 180c, and started it up. It couldn't find any System Software, so I placed in the software installation disks that came with it. When I tried to install, it couldn't find the hard drive! I have contacted the person I

  • E7 restarting when any number is pressed

    So, two days after the Symbian Anna update, my E7 has developed a new bug.  Whenever we go to the dialling screen, pressing ANY number on the onscreen number pad results in the phone restarting. In disbelief, I've let the phone restart, made sure no

  • Class organisation for long project

    Hello there, I have developed a system for some collegues which, among many others, contains a single class that shows the output of their work in a GUI. My work contract runs out soon, however, these guys are going to need to continue to develop thi