Sven Moschel

Greenhorn
+ Follow
since Oct 13, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sven Moschel

We develop a EJB enterprise application and plan to release that application next year. At the moment we debate how to deliver fix application data and how we could handle patches. With fix application data I mean all data that is necessary to work with the application (Access rights, general configuration data, ...).

Some of our developers thinks the best way to deliver such data are native sql scripts. The other part said the easiest way to deliver the data is to create classes that insert the data over some dao functionality.

Because creating indices though JPA is not possible we need sql scripts to insert them. Because of that I tend to provide the data though native sql scripts.

What functionality do you use to provide the data? Is there a "best" way to do this?
Thanks for your fast response ;). Our application server is Glassfish with persistence provide eclipselink. The callback listener is within the ejb container but lookup for services doesn´t work (java:comp/env/...). I always get a name not found exception. The only thing that works is creating a new EntityManager instance with the EntityManagerFactory. With the entity manager I am able to write the logs but that is not very nice because we have Services for that.

What does the spec say about database actions in a callback method?


I doesn´t find that point in the spec at the moment but here is something from another page:

"To avoid conflicts with the original database operation that fires the entity lifecycle event (which is still in progress) callback methods should not call EntityMan­ager or Query methods and should not access any other entity objects"

I´m not sure if using callback methods is the best way to solve this problem.
Whenever a entity is changed or deleted we must write some information about the change to the audit log. One requirement is that we must also log changes through cascade actions. Therefore I use a entity listener that contains callback methods for create/update/delete actions. The problem is that I cannot inject the services to write the audit log data. Also I´ve seen that database actions in a callback method are forbidden by specification. What is the reason for that? Is there a better way to realize audit logging?
When our EE Application starts we must have a look if there are patch scripts (containing native sql) to update the database. In my first attempt I created a Singleton which is executed on startup. This class search the patch scripts and must execute them when needed. I read the statements of the script line for line and execute the native query with "em.createNativeQuery()". The problem is that a statement of the patchscript has mostly more than one line ;). Is there a better way to execute the statements of the patch script without parsing its content?
I tried your example. It doesn´t work for me because the listbox will be displayed above the radio box. The expected result is that the listbox will be displayed under the radio box.

13 years ago
JSF
Thanks for your reply. I will try this...
13 years ago
JSF
Hi,

we have the requirement to implement a <h:selectOneRadio> component with nested components.

Example:

# Export all
# Export language
-----------------------------------------
- Listbox that holds some values.
- Only active when "export language
- is selected
-----------------------------------------
# Export something else
...

Does anybody have a idea how to implement this? Please let me know ;)


13 years ago
JSF
We implement a new Enterprise Application on EE6 and JSF2.0. Is there a good ACL security framework available which we can integrate in our application? Acegi looks good but we didn´t use the Spring framework. I´ve seen some other frameworks but nothing seems to fit our requirements. Perhaps there is another security mechanism we can use? Our security model uses roles. Each role has a different set of access rights (view, edit, create,...). The roles could be assigned to objects.

For Example:
The object "Adress" is visible for each users that are members of the role Admin.
The object "Adress" can be edited by each users of the role Supervisor.
...
Hello,

we have a Netbeans Maven Project that I want to use in Eclipse. The project contains 2 Web Projects and a EJB Project. When I deploy that application to glassfish I see a single Application in the glassfish admin view. I tried the following steps to import that project to Eclipse:

1. Convert each project to a eclipse project with "mvn eclipse:eclipse"
2. Import those projects as Maven Projects (m2eclipse) to Eclipse
3. I added the "Dynamic Web Project" and JSF Facet to the both Web Projects(Each of the web project has a reference to the EJB project)
4. I added the "EJB Project" Facet to the EJB Project
5. I added a Glassfish Server to the Server tab

With these settings I can add the 3 projects to the Glassfish server. But here comes the problem. When I try to publish/start the server each application will be deployed to glassfish as a single application. Also the publish process failed because some classes cannot be found. I think that occurs because the three projects Eclipse tries to deploy each project for itself and not as one application.

Could you please help me? I doesn´t know how I can get it work...
Hi,

I have a problem with converting the items of a "selectManyListbox". In the getAsObject method I receive the key of my selected object. But where can I get this object? I don´t want to load it again from database. The objects are already assigned to the listbox. Is there a generic way to get this objects from the component?

I need something like that:



Best,
Sven
13 years ago
JSF