Well, i deleted my EJB (it wasn't necessary). I just created my JDBC Application Module to use it in my WAR without doing all those things in the link. Putting my datasource-jdbc.xml in the config folder (META-INF) and inserting the next code in the weblogic-application.xml was enough:
<module>
<name>
MyDatabase
</name>
<type>
JDBC
</type>
<path>
META-INF/datasource-jdbc.xml
</path>
</module>
Then I used the JNDI "MyDatabase" in my Persistence.xml
To generate the datasource-jdbc.xml you can go to the server (a testing one), make the datasource and then go to the server folder and there is a folder (inside one of the main folders, look for it) with the name "jdbc". Inside it, you can get your generated xml.