The spec clearly says you must not access file system:
An enterprise bean must not use the java.io package to attempt to access files and directories
in the file system.
The file system APIs are not well-suited for business components to access data. Business components
should use a resource manager API, such as JDBC, to store data.
In praxis JBoss will let you use the file system (other application servers may forbid this via the SecurityManager).
But you have to be careful at all. Think of passivation, transactions and platform dependent issues.
What about using a MBean to wrap the work Lucene is doing?